From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756673AbYEORUe (ORCPT ); Thu, 15 May 2008 13:20:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755956AbYEORUB (ORCPT ); Thu, 15 May 2008 13:20:01 -0400 Received: from hellhawk.shadowen.org ([80.68.90.175]:3237 "EHLO hellhawk.shadowen.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755834AbYEORUA (ORCPT ); Thu, 15 May 2008 13:20:00 -0400 From: Andy Whitcroft To: linux-mm@kvack.org Cc: Andrew Morton , Christoph Lameter , KAMEZAWA Hiroyuki , KOSAKI Motohiro , Rik van Riel , Jeremy Fitzhardinge , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] slub: record page flag overlays explicitly References: InReply-To: Date: Thu, 15 May 2008 18:19:59 +0100 Message-Id: <1210871999.0@pinky> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SLUB reuses two page bits for internal purposes, it overlays PG_active and PG_error. This is hidden away in slub.c. Document these overlays explicitly in the main page-flags enum along with all the others. Signed-off-by: Andy Whitcroft --- include/linux/page-flags.h | 4 ++++ mm/slub.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 2cc1fb1..2e88df6 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -103,6 +103,10 @@ enum pageflags { /* XEN */ PG_pinned = PG_owner_priv_1, + + /* SLUB */ + PG_slub_frozen = PG_active, + PG_slub_debug = PG_error, }; #ifndef __GENERATING_BOUNDS_H diff --git a/mm/slub.c b/mm/slub.c index a505a82..fd7c61a 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -102,10 +102,10 @@ * the fast path and disables lockless freelists. */ -#define FROZEN (1 << PG_active) +#define FROZEN (1 << PG_slub_frozen) #ifdef CONFIG_SLUB_DEBUG -#define SLABDEBUG (1 << PG_error) +#define SLABDEBUG (1 << PG_slub_debug) #else #define SLABDEBUG 0 #endif