[lkml]   [2007]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: 2.6.20-mm1 [kernel BUG at mm/swap.c:442]
On Thu, 15 Feb 2007, Andrew Morton wrote:

> I don't immediately see why that code isn't racy: the page can remain
> in the pagevec for arbitrary amounts of time and someone can come along
> and mlock it again. But given the ease with which you're hitting this,
> it may not be a race.

As long as the page is on the pagevec it should be off the LRU.
Marking a page PageMlocked requires the page to be on the LRU. So a page
cannot be marked PageMlocked as long as it is on the regular pagevecs.

Somehow a page off the LRU was marked PageMlocked. Or a new anonymous page
was allocated and marked PageMlocked and then some later processing put it
onto the LRU?

Maybe try_to_set_mlocked does work some havoc here.

Could you see if this patch fixes it? This just disabled an optimization
to set PageMlocked early.

Index: linux-2.6.20-mm1/mm/memory.c
--- linux-2.6.20-mm1.orig/mm/memory.c 2007-02-15 14:35:41.000000000 -0800
+++ linux-2.6.20-mm1/mm/memory.c 2007-02-15 14:35:54.000000000 -0800
@@ -930,6 +930,8 @@ static void try_to_set_mlocked(struct pa
struct zone *zone;
unsigned long flags;

+ return;
if (!PageLRU(page) || PageMlocked(page))

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2007-02-15 23:43    [W:0.161 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site