From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 19 Oct 2005 08:29:37 -0700 (PDT) From: Christoph Lameter Subject: Re: [PATCH 1/2] Page migration via Swap V2: Page Eviction In-Reply-To: Message-ID: References: <20051018004932.3191.30603.sendpatchset@schroedinger.engr.sgi.com> <20051018004937.3191.42181.sendpatchset@schroedinger.engr.sgi.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Magnus Damm Cc: akpm@osdl.org, linux-mm@kvack.org, lhms-devel@lists.sourceforge.net, ak@suse.de List-ID: On Wed, 19 Oct 2005, Magnus Damm wrote: > I'm trying to figure out if this code works in all cases: > > + spin_lock_irq(&zone->lru_lock); > + list_del(&page->lru); > + if (!TestSetPageLRU(page)) { > + if (PageActive(page)) > + add_page_to_active_list(zone, page); > + else > + add_page_to_inactive_list(zone, page); > + count++; > + } > + spin_unlock_irq(&zone->lru_lock); > > Why not use if (TestSetPageLRU(page)) BUG()? That is probably right. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org