Re: VFS: C99 sparse format for struct vfsops

From: Doug Rabson <dfr_at_nlsystems.com>
Date: 04 Jun 2003 12:09:00 +0100
On Mon, 2003-06-02 at 21:04, Paul Richards wrote:
> On Tue, 2003-06-03 at 18:19, M. Warner Losh wrote:
> > 
> > Notice how thread 1's _m gets set based on the results of the kobj
> > lookup, and we have a race, even if thread1 and thread2 took out their
> > driver instance locks.
> 
> That means we have to lock the dispatch table before every method is
> looked up and hold it until the method returns (the alternative would be
> to free it inside the method once it had been called but that'd be a
> right mess).

Don't even think about trying to put a mutex into the kobj dispatch
sequence. That would make the call several thousand times slower. We
might as well write the kernel in Visual Basic. I've been thinking about
this problem for a long time and I'm certain there is a way to make this
safe without sacrificing performance.

I have an idea I'm working on right now which should work (at least I
haven't managed to disprove it so far) and which would have
approximately the same performance profile as the current mechanism.
Received on Wed Jun 04 2003 - 02:11:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:10 UTC