Re: [PATCH] fix double unlock_page() in 2.6.26-rc5-mm3 kernel BUG at mm/filemap.c:575!

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>
Cc: Andrew Morton <akpm@...>, KOSAKI Motohiro <kosaki.motohiro@...>, Kamalesh Babulal <kamalesh@...>, <linux-kernel@...>, <kernel-testers@...>, <linux-mm@...>, Nick Piggin <npiggin@...>, Andy Whitcroft <apw@...>, riel@redhat.com <riel@...>
Date: Tuesday, June 17, 2008 - 11:26 am

On Tue, 2008-06-17 at 11:32 +0900, KAMEZAWA Hiroyuki wrote:

Kame-san:  The restriction to put the page back to the LRU via
putback_lru_page() with the page locked does come from the unevictable
page infrastructure.  Both page migration and vmscan can hold the page
isolated from the LRU, but unlocked, for quite some time.  During this
time, a page can become nonreclaimable [or unevictable] or a
nonreclaimable page can become reclaimable.  It's OK if an unevictable
pages gets on on the regular LRU lists, because we'll detect it and
"cull" it if/when vmscan attempts to reclaim it.  However, if a
reclaimable page gets onto the unevictable LRU list, we may never get it
off, except via manual scan.  Rik doesn't think we need the manual scan,
so we've been very careful to avoid conditions where we could "leak" a
reclaimable page permantently onto the unevictable list.  Kosaki-san
found several scenarios where this could happen unless we check, under
page lock, the unevictable conditions when putting these pages back on
the LRU.


I've considered modifying putback_lru_page() not to unlock/put the page
when mapping == NULL and count == 1.  Then all of the callers would have
to remember this state, drop the lock and call put page themselves.  I
think this would duplicate code and look ugly, but if we need to do
that, I guess we'll do it.

Regards,
Lee

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

Messages in current thread:
2.6.26-rc5-mm3, Andrew Morton, (Thu Jun 12, 1:59 am)
Re: 2.6.26-rc5-mm3: BUG large value for HugePages_Rsvd, Jon Tollefson, (Thu Jun 19, 12:27 pm)
Re: 2.6.26-rc5-mm3: BUG large value for HugePages_Rsvd, Andy Whitcroft, (Thu Jun 19, 1:16 pm)
Re: 2.6.26-rc5-mm3: BUG large value for HugePages_Rsvd, Jon Tollefson, (Thu Jun 19, 11:18 pm)
[BUG][PATCH -mm] avoid BUG() in __stop_machine_run(), Hidehiro Kawai, (Thu Jun 19, 2:59 am)
Re: [BUG][PATCH -mm] avoid BUG() in __stop_machine_run(), Rusty Russell, (Thu Jun 19, 6:12 am)
Re: [BUG][PATCH -mm] avoid BUG() in __stop_machine_run(), Jeremy Fitzhardinge, (Thu Jun 19, 11:51 am)
Re: [BUG][PATCH -mm] avoid BUG() in __stop_machine_run(), Rusty Russell, (Sun Jun 22, 11:55 pm)
[PATCH][RFC] fix kernel BUG at mm/migrate.c:719! in 2.6.26-r..., Daisuke Nishimura, (Tue Jun 17, 3:35 am)
Re: [PATCH][RFC] fix kernel BUG at mm/migrate.c:719! in 2.6...., KAMEZAWA Hiroyuki, (Tue Jun 17, 9:13 pm)
[PATCH] migration_entry_wait fix., KAMEZAWA Hiroyuki, (Tue Jun 17, 9:54 pm)
Re: [PATCH] migration_entry_wait fix., Nick Piggin, (Wed Jun 18, 1:35 am)
Re: [PATCH] migration_entry_wait fix., KAMEZAWA Hiroyuki, (Wed Jun 18, 2:04 am)
Re: [PATCH] migration_entry_wait fix., Nick Piggin, (Wed Jun 18, 2:42 am)
Re: [PATCH] migration_entry_wait fix., KAMEZAWA Hiroyuki, (Wed Jun 18, 2:52 am)
[PATCH -mm][BUGFIX] migration_entry_wait fix. v2, KAMEZAWA Hiroyuki, (Wed Jun 18, 3:29 am)
Re: [PATCH -mm][BUGFIX] migration_entry_wait fix. v2, Nick Piggin, (Wed Jun 18, 3:40 am)
Re: [PATCH -mm][BUGFIX] migration_entry_wait fix. v2, KOSAKI Motohiro, (Wed Jun 18, 3:26 am)
Re: [PATCH] migration_entry_wait fix., KOSAKI Motohiro, (Wed Jun 18, 1:26 am)
Re: [PATCH][RFC] fix kernel BUG at mm/migrate.c:719! in 2.6...., Daisuke Nishimura, (Tue Jun 17, 9:26 pm)
Re: [PATCH][RFC] fix kernel BUG at mm/migrate.c:719! in 2.6...., Daisuke Nishimura, (Tue Jun 17, 10:59 pm)
Re: [PATCH][RFC] fix kernel BUG at mm/migrate.c:719! in 2.6...., Daisuke Nishimura, (Tue Jun 17, 9:54 pm)
Re: [PATCH][RFC] fix kernel BUG at mm/migrate.c:719! in 2.6...., Daisuke Nishimura, (Wed Jun 18, 12:41 am)
[PATCH][-mm] remove redundant page-&gt;mapping check, KOSAKI Motohiro, (Wed Jun 18, 3:54 am)
Re: [PATCH][RFC] fix kernel BUG at mm/migrate.c:719! in 2.6...., KAMEZAWA Hiroyuki, (Wed Jun 18, 12:59 am)
[Bad page] trying to free locked page? (Re: [PATCH][RFC] fix..., Daisuke Nishimura, (Tue Jun 17, 3:47 am)
[Experimental][PATCH] putback_lru_page rework, KAMEZAWA Hiroyuki, (Wed Jun 18, 5:40 am)
Re: [Experimental][PATCH] putback_lru_page rework, Lee Schermerhorn, (Wed Jun 18, 2:21 pm)
Re: [Experimental][PATCH] putback_lru_page rework, KAMEZAWA Hiroyuki, (Wed Jun 18, 8:22 pm)
Re: [Experimental][PATCH] putback_lru_page rework, Lee Schermerhorn, (Thu Jun 19, 10:45 am)
Re: [Experimental][PATCH] putback_lru_page rework, KAMEZAWA Hiroyuki, (Thu Jun 19, 9:13 pm)
Re: [Experimental][PATCH] putback_lru_page rework, KOSAKI Motohiro, (Sat Jun 21, 4:39 am)
Re: [Experimental][PATCH] putback_lru_page rework, Lee Schermerhorn, (Fri Jun 20, 1:10 pm)
Re: [Experimental][PATCH] putback_lru_page rework, KOSAKI Motohiro, (Sat Jun 21, 4:41 am)
Re: [Experimental][PATCH] putback_lru_page rework, Lee Schermerhorn, (Fri Jun 20, 4:41 pm)
Re: [Experimental][PATCH] putback_lru_page rework, KOSAKI Motohiro, (Sat Jun 21, 4:56 am)
Re: [Experimental][PATCH] putback_lru_page rework, KAMEZAWA Hiroyuki, (Sun Jun 22, 8:30 pm)
Re: [Experimental][PATCH] putback_lru_page rework, KAMEZAWA Hiroyuki, (Thu Jun 19, 8:47 pm)
Re: Re: [Experimental][PATCH] putback_lru_page rework, Lee Schermerhorn, (Fri Jun 20, 12:24 pm)
Re: [Experimental][PATCH] putback_lru_page rework, Daisuke Nishimura, (Wed Jun 18, 10:50 am)
Re: [Experimental][PATCH] putback_lru_page rework, KOSAKI Motohiro, (Wed Jun 18, 7:36 am)
Re: [Experimental][PATCH] putback_lru_page rework, KAMEZAWA Hiroyuki, (Wed Jun 18, 7:55 am)
Re: [Experimental][PATCH] putback_lru_page rework, Daisuke Nishimura, (Thu Jun 19, 4:00 am)
Re: [Experimental][PATCH] putback_lru_page rework, KAMEZAWA Hiroyuki, (Thu Jun 19, 4:24 am)
Re: [Bad page] trying to free locked page? (Re: [PATCH][RFC]..., Daisuke Nishimura, (Tue Jun 17, 10:32 pm)
Re: [Bad page] trying to free locked page? (Re: [PATCH][RFC]..., KAMEZAWA Hiroyuki, (Tue Jun 17, 5:03 am)
Re: [Bad page] trying to free locked page? (Re: [PATCH][RFC]..., Daisuke Nishimura, (Tue Jun 17, 5:15 am)
Re: [Bad page] trying to free locked page? (Re: [PATCH][RFC]..., Daisuke Nishimura, (Tue Jun 17, 10:40 pm)
Re: 2.6.26-rc5-mm3, Byron Bradley, (Thu Jun 12, 7:32 pm)
Re: 2.6.26-rc5-mm3, Daniel Walker, (Wed Jun 18, 1:55 pm)
Re: 2.6.26-rc5-mm3, Ingo Molnar, (Thu Jun 19, 5:13 am)
Re: 2.6.26-rc5-mm3, Daniel Walker, (Thu Jun 19, 10:39 am)
Re: 2.6.26-rc5-mm3, Daniel Walker, (Thu Jun 12, 7:55 pm)
Re: 2.6.26-rc5-mm3, Byron Bradley, (Thu Jun 12, 8:04 pm)
[BUG] 2.6.26-rc5-mm3 kernel BUG at mm/filemap.c:575!, Kamalesh Babulal, (Thu Jun 12, 4:44 am)
Re: [BUG] 2.6.26-rc5-mm3 kernel BUG at mm/filemap.c:575!, Andrew Morton, (Fri Jun 13, 3:16 am)
Re: [BUG] 2.6.26-rc5-mm3 kernel BUG at mm/filemap.c:575!, Andrew Morton, (Thu Jun 12, 4:57 am)
Re: [BUG] 2.6.26-rc5-mm3 kernel BUG at mm/filemap.c:575!, KAMEZAWA Hiroyuki, (Thu Jun 12, 8:25 pm)
Re: [BUG] 2.6.26-rc5-mm3 kernel BUG at mm/filemap.c:575!, KAMEZAWA Hiroyuki, (Thu Jun 12, 7:20 am)
[PATCH] fix double unlock_page() in 2.6.26-rc5-mm3 kernel BU..., KAMEZAWA Hiroyuki, (Thu Jun 12, 9:44 pm)
Re: [PATCH] fix double unlock_page() in 2.6.26-rc5-mm3 kerne..., Lee Schermerhorn, (Fri Jun 13, 11:30 am)
Re: [PATCH] fix double unlock_page() in 2.6.26-rc5-mm3 kerne..., KAMEZAWA Hiroyuki, (Mon Jun 16, 10:32 pm)
Re: [PATCH] fix double unlock_page() in 2.6.26-rc5-mm3 kerne..., Lee Schermerhorn, (Tue Jun 17, 11:26 am)
Re: [PATCH] fix double unlock_page() in 2.6.26-rc5-mm3 kerne..., Lee Schermerhorn, (Mon Jun 16, 10:49 am)
Re: [PATCH] fix double unlock_page() in 2.6.26-rc5-mm3 kerne..., Kamalesh Babulal, (Sat Jun 14, 11:59 pm)
2.6.26-rc5-mm3: kernel BUG at mm/vmscan.c:510, Alexey Dobriyan, (Thu Jun 12, 3:58 am)
Re: 2.6.26-rc5-mm3: kernel BUG at mm/vmscan.c:510, Andrew Morton, (Thu Jun 12, 4:22 am)
Re: 2.6.26-rc5-mm3: kernel BUG at mm/vmscan.c:510, Alexey Dobriyan, (Thu Jun 12, 4:23 am)