mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From cd0fa86de6ca1d40c0a93d86d1c0f7846e8a9a10 Mon Sep 17 00:00:00 2001
|
|
From: Laura Abbott <lauraa@codeaurora.org>
|
|
Date: Fri, 3 Jan 2014 10:47:00 -0800
|
|
Subject: [PATCH] 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 <lauraa@codeaurora.org>
|
|
---
|
|
fs/fuse/file.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
|
|
index e231a7ff11390..3411ed834bbac 100644
|
|
--- a/fs/fuse/file.c
|
|
+++ b/fs/fuse/file.c
|
|
@@ -822,6 +822,8 @@ static int fuse_readpages_fill(void *_data, struct page *page)
|
|
lock_page(newpage);
|
|
put_page(newpage);
|
|
|
|
+ lru_cache_add_file(newpage);
|
|
+
|
|
/* finally release the old page and swap pointers */
|
|
unlock_page(oldpage);
|
|
page_cache_release(oldpage);
|