[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0806091123400.30605@schroedinger.engr.sgi.com>
Date: Mon, 9 Jun 2008 11:28:00 -0700 (PDT)
From: Christoph Lameter <clameter@....com>
To: Russ Anderson <rja@....com>
cc: linux-kernel@...r.kernel.org, linux-ia64@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH 2/3] mm: Avoid putting a bad page back on the LRU v6
On Mon, 9 Jun 2008, Russ Anderson wrote:
> -#define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \
> +#define PAGE_FLAGS_BASE (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \
> 1 << PG_buddy | 1 << PG_writeback | \
> 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active)
> +
> +#ifdef CONFIG_PAGEFLAGS_EXTENDED
> +PAGEFLAG(MemError, memerror)
> +#define PAGE_FLAGS (PAGE_FLAGS_BASE | 1UL << PG_memerror)
> +#else
> +PAGEFLAG_FALSE(MemError)
> +#define PAGE_FLAGS (PAGE_FLAGS_BASE)
> +#endif
Hmmmm... That doesnt look nice. It would be good if we had some definition
that allows the simple oring with a flag mask. That mask should be
zero if the flag is always false.
#ifdef CONFIG_PAGEFLAGS_EXTENDED
PAGEFLAG(MemError, memerror)
#define MemError_mask (1 << PG_memerror)
#else
PAGEFLAG_FALSE(MemError)
#define MemError_mask 0
#endif
#define PAGE_FLAGS (PAGE_FLAGS_BASE | MemError_mask)
Maybe we could have the PAGEFLAG and the PAGEFLAG_FALSE macros generate
these definitions?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists