[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111108000335.GA7518@quack.suse.cz>
Date: Tue, 8 Nov 2011 01:03:35 +0100
From: Jan Kara <jack@...e.cz>
To: Kazuya Mio <k-mio@...jp.nec.com>
Cc: Jan Kara <jack@...e.cz>, ext4 <linux-ext4@...r.kernel.org>,
Theodore Tso <tytso@....edu>,
Andreas Dilger <adilger@...ger.ca>
Subject: Re: [BUG] aborted ext4 leads to inifinity loop in
balance_dirty_pages
On Fri 28-10-11 14:34:31, Kazuya Mio wrote:
> 2011/10/25 22:40, Jan Kara wrote:
> > Please no. Generally this boils down to what do we do with dirty data
> >when there's error in writing them out. Currently we just throw them away
> >(e.g. in media error case) but I don't think that's a generally good thing
> >because e.g. admin may want to copy the data to other working storage or
> >so. So I think we should rather keep the data and provide a mechanism for
> >userspace to ask kernel to get rid of the data (so that we don't eventually
> >run OOM).
>
> I see. I agree with you.
>
> >>Do you have any ideas?
> > So the question is what would you like to achieve. If you just want to
> >unblock a thread then a solution would be to make a thread at
> >balance_dirty_pages() killable. If generally you want to get rid of dirty
> >memory, then I don't have a really good answer but throwing dirty data away
> >seems like a bad answer to me.
>
> The problem is that we cannot unmount the corrupted filesystem due to
> un-killable dd process. We must bring down the system to resume the service
> with no dirty pages. I think it is important for the service continuity
> to be able to kill the thread handling in balance_dirty_pages().
OK, attached are two patches based on latest Linus's tree that should
make your task killable. Can you test them?
Honza
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
View attachment "0001-mm-Make-task-in-balance_dirty_pages-killable.patch" of type "text/x-patch" (1076 bytes)
View attachment "0002-fs-Make-write-2-interruptible-by-a-signal.patch" of type "text/x-patch" (980 bytes)
Powered by blists - more mailing lists