Re: journaling & VM (was: Re: reiserfs being part of the kernel: it'snot just the code)

From: Stephen C. Tweedie (sct@redhat.com)
Date: Wed Jun 07 2000 - 06:12:43 EST


Hi,

On Tue, Jun 06, 2000 at 06:19:22PM -0700, Hans Reiser wrote:
>
> There are two issues to address:
>
> 1) If a buffer needs to be flushed to disk, how do we let the FS flush
> everything else that it is optimal to flush at the same time as that buffer.
> zam's allocate on flush code addresses that issue for reiserfs, and he has some
> general hooks implemented also. He is guessed to be two weeks away.

That's easy to deal with using address_space callbacks from shrink_mmap.
shrink_mmap just calls into the filesystem to tell it that something
needs to be done. The filesystem can, in response, flush as much data
as it wants to in addition to the page requested --- or can flush none
at all if the page is pinned. The address_space callbacks should be
thought of as hints from the VM that the filesystem needs to do
something. shrink_mmap will keep on trying until it finds something
to free if nothing happens on the first call.

> 2) If multiple kernel subsystem page pinners pin memory, how do we keep them
> from deadlocking. Chris as you know is the reiserfs guy for that.

Use reservations. That's the point --- you reserve in advance, so that
the VM can *guarantee* that you can continue to pin more pages up to
the maximum you have reserved. You take a reservation before starting
a fs operation, so that if you need to block, it doesn't prevent the
running transaction from being committed.

Cheers,
 Stephen

-
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 : Wed Jun 07 2000 - 21:00:28 EST