Re: [RFC] Parallelize IO for e2fsck

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <Valdis.Kletnieks@...>, David Chinner <dgc@...>, Valerie Henson <val@...>, <linux-fsdevel@...>, <linux-ext4@...>, <linux-kernel@...>, Andreas Dilger <adilger@...>, Ric Wheeler <ric@...>
Date: Tuesday, January 22, 2008 - 10:40 am

On Tue, Jan 22, 2008 at 12:00:50AM -0700, Andreas Dilger wrote:

It's been discussed before, but I suspect the main reason why it was
never done is no one submitted a patch.  Also, the problem is actually
a pretty complex one.  There are a couple of different stages where
you might want to send an alert to processes:

    * Data is starting to get ejected from page/buffer cache
    * System is starting to swap
    * System is starting to really struggle to find memory
    * System is starting an out-of-memory killer

AIX's SIGDANGER really did the last two, where the OOM killer would
tend to avoid processes that had a SIGDANGER handler in favor of
processes that were SIGDANGER unaware.

Then there is the additional complexity in Linux that you have
multiple zones of memory, which at least on the historically more
popular x86 was highly, highly important.  You could say that whenever
there is sufficient memory pressure in any zone that you start
ejecting data from caches or start to swap that you start sending the
signals --- but on x86 systems with lowmem, that could happen quite
frequently, and since a user process has no idea whether its resources
are in lowmem or highmem, there's not much you can do about this.

Hopefully this is less of an issue today, since the 2.6 VM is much
more better behaved, and people are gradually moving over to x86_64
anyway.  (Sorry SGI and Intel, unfortunately they're not moving over
to the Itanic :-).   So maybe this would be better received now.

Bringing us back to the main topic at hand, one of the tradeoffs in
Val's current approach is that by relying on the kernel's buffer
cache, we don't have to worry about locking and coherency at the
userspace level.  OTOH, we give up low-level control about when memory
gets thrown out, and it also means that simply getting notified when
the system starts to swap isn't good enough.  We need to know much
earlier, when the system starts ejecting data from the buffer and page
caches.

Does this matter?  Well, there are a couple of use cases:

     * The restricted boot environment
     * The background "once a month" take a snapshot and check
     * The oh-my-gosh we-lost-a-filesystem -- repair it while the 
       IMAP server is still on-line serving data from the other 
       mounted filesystems.

It's the last case where things get really tricky....

     	      	   	 	    - Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] Parallelize IO for e2fsck, Valerie Henson, (Wed Jan 16, 5:30 pm)
Re: [RFC] Parallelize IO for e2fsck, Andreas Dilger, (Mon Jan 21, 7:00 pm)
Re: [RFC] Parallelize IO for e2fsck, David Chinner, (Mon Jan 21, 11:38 pm)
Re: [RFC] Parallelize IO for e2fsck, Bryan Henderson, (Tue Jan 22, 1:42 pm)
Re: [RFC] Parallelize IO for e2fsck, Andreas Dilger, (Tue Jan 22, 3:05 am)
Re: [RFC] Parallelize IO for e2fsck, David Chinner, (Tue Jan 22, 4:16 am)
Re: [RFC] Parallelize IO for e2fsck, , (Tue Jan 22, 12:17 am)
Re: [RFC] Parallelize IO for e2fsck, Andreas Dilger, (Tue Jan 22, 3:00 am)
Re: [RFC] Parallelize IO for e2fsck, Theodore Tso, (Tue Jan 22, 10:40 am)
Re: [RFC] Parallelize IO for e2fsck, Pavel Machek, (Mon Jan 28, 3:30 pm)
Re: [RFC] Parallelize IO for e2fsck, Theodore Tso, (Mon Jan 28, 3:56 pm)
Re: [RFC] Parallelize IO for e2fsck, , (Tue Jan 29, 4:29 am)
Re: [RFC] Parallelize IO for e2fsck, Pavel Machek, (Mon Jan 28, 4:01 pm)
Re: [RFC] Parallelize IO for e2fsck, KOSAKI Motohiro, (Sun Feb 3, 9:51 am)
Re: [RFC] Parallelize IO for e2fsck, Arnaldo Carvalho de Melo, (Tue Jan 22, 10:57 am)
Re: [RFC] Parallelize IO for e2fsck, Alan Cox, (Tue Jan 22, 9:05 am)
Re: [RFC] Parallelize IO for e2fsck, David Chinner, (Thu Jan 17, 9:15 pm)
Re: [RFC] Parallelize IO for e2fsck, Valerie Henson, (Thu Jan 17, 9:43 pm)