lkml.org 
[lkml]   [2008]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2008-04-28 21:43    [W:0.234 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site