Re: [PATCH 06/41] FS-Cache: Recruit a page flags for cache management [ver #48]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux