[lkml]   [2004]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RESEND][PATCH 5/6] Provide a filesystem-specific sync'able page bit
On Thu, Oct 14, 2004 at 08:05:07PM +0100, David Howells wrote:
> #define PG_highmem 8
> +#define PG_fs_misc 9 /* Filesystem specific bit */
> #define PG_checked 9 /* kill me in 2.5.<early>. */
> #define PG_arch_1 10
> #define PG_reserved 11
> @@ -315,4 +316,13 @@ static inline void set_page_writeback(st
> test_set_page_writeback(page);
> }
> +/*
> + * Filesystem-specific page bit testing
> + */
> +#define PageFsMisc(page) test_bit(PG_fs_misc, &(page)->flags)
> +#define SetPageFsMisc(page) set_bit(PG_fs_misc, &(page)->flags)
> +#define TestSetPageFsMisc(page) test_and_set_bit(PG_fs_misc, &(page)->flags)
> +#define ClearPageFsMisc(page) clear_bit(PG_fs_misc, &(page)->flags)
> +#define TestClearPageFsMisc(page) test_and_clear_bit(PG_fs_misc, &(page)->flags)
> +
> #endif /* PAGE_FLAGS_H */

That's not really enough documentation. Who sets this flag? Who clears this
flag? Currently, mm/page_alloc.c clears this flag:

./mm/page_alloc.c: 1 << PG_checked | 1 << PG_mappedtodisk);

which probably wouldn't be noticed by someone grepping for uses.
If you're going to not kill this flag, at least rename it so we don't
have two defines for the same bit.

The other 'misc bit' has documentation of the form:

* PG_arch_1 is an architecture specific page state bit. The generic code
* guarantees that this bit is cleared for a page when it first is entered into
* the page cache.

which really ought to at least mention Documentation/cachetlb.txt

"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:07    [W:0.037 / U:3.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site