> > The buffer-head structure has a wait queue for processes blocked on it: 
> >     struct wait_queue * b_wait;
> > If 2 processes want read-only access we could wake up the both of them.
> > (This is only useful on SMP systems, i think).
> > This is already done in 2.2/2.3? This can be done? 
> 
> in 2.3 we never block readers - of course if buffer contents represent
> on-disk contents. So yes, in 2.3 we wake up all processes waiting for a
> particular buffer to go uptodate - and they will all be able to use data
> contents in parallel. (this 'wake-all' thing is a generic behavior, this
> is why we have a per-buffer waitqueue)

btw., we almost never wait on b_wait() in the typical read case - we use
page->wait for that. This means that for a 1k filesystem we'll get only
one wakeup for that page, not 4. This has been so in 2.0 and 2.2 as well.

-- mingo

-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to