|
From: | John Ogness |
Subject: | [Dazuko-devel] Dazuko on FreeBSD (no more open-file-list) |
Date: | Thu, 20 Jan 2005 23:35:53 +0100 |
User-agent: | Mozilla Thunderbird 0.9 (X11/20041114) |
Hi,I realized a couple days ago that the FreeBSD extension from Dazuko implements a work-around that was designed for Linux. The open-file lists have been causing lots of problems. Normally this list is not needed, but under Linux the necessary structures to do file_descriptor->file_name lookups are hidden from kernel modules. This is why Dazuko must track the file_names/file_descriptors as they are opened.
However, FreeBSD does not hide it's code from modules. So under FreeBSD, closing file_descriptors should be no problem to look up the corresponding file_names.
Well, I implemented this under FreeBSD 4 and it works beautifully (available in CVS). Right now it is only being used for the sys_close call. I will include this support to dup and dup2 shortly. Then I can copy it over to FreeBSD 5.
This is great news because it means no more memory leaks or unreliability with ON_CLOSE events (under FreeBSD). Linux could also do this if people were willing to compile Dazuko into the kernel (and not as a kernel module). I may make this an option since ON_CLOSE is a very important event and the memory leaks it causes are unbearable.
This implementation also means that there is no way to track writes (because I will eliminate the open-file-list). This means that ON_CLOSE_MODIFIED events will never be generated. I personally do not have a problem with this because the ON_CLOSE_MODIFIED events generate an enormous overhead for something that a userspace application can do itself easily (and much more effeciently).
John Ogness -- Dazuko Maintainer
[Prev in Thread] | Current Thread | [Next in Thread] |