Messages in this thread | | | Date | Mon, 28 Apr 2008 12:39:06 -0700 (PDT) | From | Christoph Lameter <> | Subject | Re: [PATCH 1/2] mm: Avoid putting a bad page back on the LRU |
| |
On Mon, 28 Apr 2008, Russ Anderson wrote:
> +#if (BITS_PER_LONG > 32) > +#define PageMemError(page) test_bit(PG_memerror, &(page)->flags) > +#define SetPageMemError(page) set_bit(PG_memerror, &(page)->flags) > +#define ClearPageMemError(page) clear_bit(PG_memerror, &(page)->flags) > +#define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ > + 1 << PG_buddy | 1 << PG_writeback | \ > + 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ > + 1UL << PG_memerror) > +#else > +#define PageMemError(page) 0 > +#define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ > + 1 << PG_buddy | 1 << PG_writeback | \ > + 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active) > +#endif > +#define PAGE_FLAGS_RECLAIM (PAGE_FLAGS | 1 << PG_reclaim | 1 << PG_dirty) > +#define PAGE_FLAGS_RESERVE (PAGE_FLAGS | 1 << PG_reserved) > +#define PAGE_FLAGS_DIRTY (PAGE_FLAGS | 1 << PG_reserved | 1 << PG_dirty) > +
All the PAGE_FLAGS_xx things could be in a separate cleanup patch. Also note that the way page flags are defined may change soon.
| |