Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1575975

[PATCH] mm: fix KPF_SWAPCACHE

From Hugh Dickins <hughd@google.com>
Newsgroups linux.kernel
Subject [PATCH] mm: fix KPF_SWAPCACHE
Date 2017-02-07 20:20 +0100
Message-ID <t8jsZ-6U2-15@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


4.10-rc1 commit 6326fec1122c ("mm: Use owner_priv bit for PageSwapCache,
valid when PageSwapBacked") aliased PG_swapcache to PG_owner_priv_1:
so /proc/kpageflags' KPF_SWAPCACHE should now be synthesized, instead
of being shown on unrelated pages which have PG_owner_priv_1 set.

Signed-off-by: Hugh Dickins <hughd@google.com>
---

 fs/proc/page.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- 4.10-rc7/fs/proc/page.c	2016-12-25 18:40:50.618454962 -0800
+++ linux/fs/proc/page.c	2017-02-07 10:28:51.019640392 -0800
@@ -173,7 +173,8 @@ u64 stable_page_flags(struct page *page)
 	u |= kpf_copy_bit(k, KPF_ACTIVE,	PG_active);
 	u |= kpf_copy_bit(k, KPF_RECLAIM,	PG_reclaim);
 
-	u |= kpf_copy_bit(k, KPF_SWAPCACHE,	PG_swapcache);
+	if (PageSwapCache(page))
+		u |= 1 << KPF_SWAPCACHE;
 	u |= kpf_copy_bit(k, KPF_SWAPBACKED,	PG_swapbacked);
 
 	u |= kpf_copy_bit(k, KPF_UNEVICTABLE,	PG_unevictable);

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] mm: fix KPF_SWAPCACHE Hugh Dickins <hughd@google.com> - 2017-02-07 20:20 +0100
  Re: [PATCH] mm: fix KPF_SWAPCACHE Nicholas Piggin <npiggin@gmail.com> - 2017-02-09 05:30 +0100
    Re: [PATCH] mm: fix KPF_SWAPCACHE Hugh Dickins <hughd@google.com> - 2017-02-09 06:30 +0100

csiph-web