From d1ac033d7862a7ec45fb1be8c06b8f51b36deb1a Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Fri, 3 Jan 2014 10:47:00 -0800 Subject: fs: fuse: Add replacment for CMA pages into the LRU cache CMA pages are currently replaced in the FUSE file system since FUSE may hold on to CMA pages for a long time, preventing migration. The replacement page is added to the file cache but not the LRU cache. This may prevent the page from being properly aged and dropped, creating poor performance under tight memory condition. Fix this by adding the new page to the LRU cache after creation. Change-Id: Ib349abf1024d48386b835335f3fbacae040b6241 CRs-Fixed: 586855 Signed-off-by: Laura Abbott --- fs/fuse/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index c4ced86..e3181a3 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -929,6 +929,8 @@ static int fuse_readpages_fill(void *_data, struct page *page) */ put_page(newpage); + lru_cache_add_file(newpage); + /* finally release the old page and swap pointers */ unlock_page(oldpage); page_cache_release(oldpage); -- cgit v1.1