Re: __commit_write() with the Page Cache

From: Linus Torvalds (torvalds@transmeta.com)
Date: Thu May 11 2000 - 19:49:43 EST


On Thu, 11 May 2000, Jeff V. Merkey wrote:
>
> One more item that did not get addressed. Can we change the callback to
> acquire a sleeping context rather than run on an interrupt?

Nope. That would slow down things incredibly.

What you can do (obviously) in your callback, is to simply do something
like
 - wake up the special thread you have for these kinds of blocks
 - add the buffer head to the list of "completed" buffer heads (or
   whatever)
 - return, and wait for your thread to actually change the state of the
   physical page in question (ie instead of marking the page up-to-date
   and unlocking it, the thread would end up doing that).

The "thread" may, of course, be a collection of threads, there's nothing
to say that you couldn't scale them to the number of CPU's or something
like that.

You could obviously also select to do it with a very generic "completion
thread" that would do whatever the buffer head pointer implied that it
should do. But because 99% of all filesystems don't actually need anything
like this, I'd hate for this to be the default - it would just slow down
the regular filesystems that much rather just get the thing over and done
with directly from the interrupt.

                Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:19 EST