Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758991AbXENFq6 (ORCPT ); Mon, 14 May 2007 01:46:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757554AbXENFqu (ORCPT ); Mon, 14 May 2007 01:46:50 -0400 Received: from smtp1.linux-foundation.org ([65.172.181.25]:34495 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754848AbXENFqt (ORCPT ); Mon, 14 May 2007 01:46:49 -0400 Date: Sun, 13 May 2007 22:46:30 -0700 From: Andrew Morton To: Fengguang Wu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Rik van Riel , "Theodore Ts'o" , "linux-ext4@vger.kernel.org" Subject: Re: [PATCH] resolve duplicate flag no for PG_lazyfree Message-Id: <20070513224630.3cd0cb54.akpm@linux-foundation.org> In-Reply-To: <379110250.28666@ustc.edu.cn> References: <379110250.28666@ustc.edu.cn> X-Mailer: Sylpheed 2.4.1 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1597 Lines: 40 On Mon, 14 May 2007 10:37:18 +0800 Fengguang Wu wrote: > PG_lazyfree and PG_booked shares the same bit. > > Either it is a bug that shall fixed by the following patch, or > the situation should be explicitly documented? > > Signed-off-by: Fengguang Wu > --- > include/linux/page-flags.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- linux-2.6.21-mm2.orig/include/linux/page-flags.h > +++ linux-2.6.21-mm2/include/linux/page-flags.h > @@ -91,7 +91,7 @@ > #define PG_buddy 19 /* Page is free, on buddy lists */ > #define PG_booked 20 /* Has blocks reserved on-disk */ > > -#define PG_lazyfree 20 /* MADV_FREE potential throwaway */ > +#define PG_lazyfree 21 /* MADV_FREE potential throwaway */ > > /* PG_owner_priv_1 users should have descriptive aliases */ > #define PG_checked PG_owner_priv_1 /* Used by some filesystems */ That's an accident: PG_lazyfree got added but the out-of-tree ext4 patches didn't get updated. otoh, the intersection between pages which are PageBooked() and pages which are PageLazyFree() should be zreo, so it'd be good to actually formalise this reuse within the ext4 patches. otoh2, PageLazyFree() could have reused PG_owner_priv_1. Rik, Ted: any thoughts? We do need to scrimp on page flags: when we finally run out, we're screwed. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/