Re: [jffs2] [rfc] fix write deadlock regression

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Woodhouse <dwmw2@...>
Cc: Jason Lunz <lunz@...>, lkml <linux-kernel@...>, <jffs-dev@...>, Hugh Dickins <hugh@...>, Andrew Morton <akpm@...>
Date: Sunday, September 2, 2007 - 9:20 am

On Sun, Sep 02, 2007 at 01:13:23PM +0100, David Woodhouse wrote:

OK, but then hasn't the patch just made the deadlock harder to hit,
or is there some invariant that says that readpage() will never be
invoked if gc was invoked on the same page as we're commit_write()ing?

The Q/A comments aren't very sure about this. I guess from the look
of it, prepare_write/commit_write make sure the page will be uptodate
by the start of commit_write, and you avoid GCing the page in
prepare_write because your new page won't have any nodes allocated
yet that can possibly be GCed?

BTW. with write_begin/write_end, you get to control the page lock,
so for example if the readpage in prepare_write for partial writes
is *only* for the purpose of avoiding this deadlock later, you
could possibly avoid the RMW with the new aops. Maybe it would
help you with data nodes crossing page boundaries too...
 


OK, thanks for looking at it. If you'd care to pass it on to Linus
before he releases 2.6.23 in random() % X days time... ;)

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
jffs2 deadlock introduced in linux 2.6.22.5, Jason Lunz, (Thu Aug 30, 2:23 pm)
Re: jffs2 deadlock introduced in linux 2.6.22.5, Jason Lunz, (Fri Aug 31, 5:26 pm)
[jffs2] [rfc] fix write deadlock regression, Jason Lunz, (Sat Sep 1, 3:06 pm)
Re: [jffs2] [rfc] fix write deadlock regression, Nick Piggin, (Sun Sep 2, 12:20 am)
Re: [jffs2] [rfc] fix write deadlock regression, David Woodhouse, (Sun Sep 2, 8:13 am)
Re: [jffs2] [rfc] fix write deadlock regression, Nick Piggin, (Sun Sep 2, 9:20 am)
Re: [jffs2] [rfc] fix write deadlock regression, David Woodhouse, (Sun Sep 2, 9:48 am)
Re: [jffs2] [rfc] fix write deadlock regression, Nick Piggin, (Sun Sep 2, 10:17 am)
Re: [jffs2] [rfc] fix write deadlock regression, David Woodhouse, (Sun Sep 2, 12:15 pm)
Re: jffs2 deadlock introduced in linux 2.6.22.5, Jesper Juhl, (Fri Aug 31, 5:32 pm)