Re: [PATCH][RFC] fix kernel BUG at mm/migrate.c:719! in 2.6.26-rc5-mm3

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Daisuke Nishimura <nishimura@...>
Cc: Andrew Morton <akpm@...>, Rik van Riel <riel@...>, Kosaki Motohiro <kosaki.motohiro@...>, Nick Piggin <npiggin@...>, <linux-mm@...>, <linux-kernel@...>, <kernel-testers@...>
Date: Tuesday, June 17, 2008 - 1:46 pm

On Tue, 2008-06-17 at 16:35 +0900, Daisuke Nishimura wrote:

Ah, I did test migration fairly heavily, but not by moving cpusets.  


Agreed.  See comments below.

I think that at least part of your patch, below, should fix this
problem.  See comments there.

Now I wonder if the assertion that newpage count == 1 could be violated?
I don't see how.  We've just allocated and filled it and haven't
unlocked it yet, so we should hold the only reference.  Do you agree?

I'm not sure about this part.  If it IS needed, I think it would be
needed independently of the unevictable/putback_lru_page() changes, as
this race must have already existed.

However, unmap_and_move() replaced the migration entries with bona fide
pte's referencing the new page before freeing the old page, so I think
we're OK without this change.


I agree with this part.  I came to the same conclusion looking at the
code.  If we just changed the if() and VM_BUG_ON() to:

if (!page->mapping && page_count(page) == 1) { ...

we'd be doing exactly what putback_lru_page() is doing.  So, this code
as always unnecessary, duplicate code [that I was trying to avoid :(].
So, just let putback_lru_page() handle this condition and conditionally
unlock_page().

I'm testing with my stress load with the 2nd part of the patch above and
it's holding up OK.  Of course, I didn't hit the problem before.  I'll
try your duplicator script and see what happens.

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...., Lee Schermerhorn, (Tue Jun 17, 1:46 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)