[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: File handling changes
On Thu, Feb 21, 2008 at 04:49:56PM +0000, Andrew Doran wrote:
> - Redo reference counting to be sane. Right now it looks like the product of
> ~30 years worth of incremental changes. With the patch, LWPs accessing
> files take a short term reference on the local file descriptor. This is
> the most common case. While a file is in a process descriptor table, a
> reference is held to the file. The file reference count only changes
> during control operations like open() or close(). Code that comes at files
> from an unusual direction (i.e. foreign to the process) like procfs or
> sysctl takes a reference on the file (f_count), and not on a descriptor.
I have noticed that the code has 2 ref counts - where only one is needed.
(and that you can't need the process creds for close()!)
> There are still problems with the patched code, which I am working on it at
> the moment. Comments?
The diffs are inpenetrable - especially the first one.
The changes to remove passing of curlwp and curproc (etc) really should
be committed separately.
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |