lkml.org 
[lkml]   [2009]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 06/41] FS-Cache: Recruit a page flags for cache management [ver #48]
Date
And frame changelogs like this as what the patch is actually doing.

mm: add another page bit to signal fs private data

Add a new flag PG_private_2 which, similarly to PG_private, instructs
the mm to call into the fs when releasing or invalidating the page.

fscache will use this for blah blah blah.


> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -283,7 +283,7 @@ static inline int page_mapping_inuse(struct page *page)
>
> static inline int is_page_cache_freeable(struct page *page)
> {
> - return page_count(page) - !!PagePrivate(page) == 2;
> + return page_count(page) - !!page_has_private(page) == 2;
> }
>
> static int may_write_to_queue(struct backing_dev_info *bdi)

What if the page has both private bits set? Will this count for 2 references?
If not, that's unintuitive and needs commenting somewhere so nobody else who
might use this bit will end up with memory leaks. If so, then you need to
modify this check to account for both possible references.


\
 
 \ /
  Last update: 2009-04-04 08:07    [W:0.260 / U:21.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site