linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] don't use mapcount() to check large folio sharing
@ 2023-07-28 16:13 Yin Fengwei
  2023-07-28 16:13 ` [PATCH 1/2] madvise: don't use mapcount() against large folio for sharing check Yin Fengwei
                   ` (3 more replies)
  0 siblings, 4 replies; 29+ messages in thread
From: Yin Fengwei @ 2023-07-28 16:13 UTC (permalink / raw)
  To: linux-mm, linux-kernel, stable, akpm, willy, vishal.moola,
	wangkefeng.wang, minchan, yuzhao, david, ryan.roberts, shy828301
  Cc: fengwei.yin

In madvise_cold_or_pageout_pte_range() and madvise_free_pte_range(),
folio_mapcount() is used to check whether the folio is shared. But it's
not correct as folio_mapcount() returns total mapcount of large folio.

Use folio_estimated_sharers() here as the estimated number is enough.

Yin Fengwei (2):
  madvise: don't use mapcount() against large folio for sharing check
  madvise: don't use mapcount() against large folio for sharing check

 mm/huge_memory.c | 2 +-
 mm/madvise.c     | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.39.2



^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2023-08-08  0:02 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28 16:13 [PATCH 0/2] don't use mapcount() to check large folio sharing Yin Fengwei
2023-07-28 16:13 ` [PATCH 1/2] madvise: don't use mapcount() against large folio for sharing check Yin Fengwei
2023-07-28 16:13 ` [PATCH 2/2] " Yin Fengwei
2023-07-28 17:41   ` Andrew Morton
2023-07-29 13:53     ` Yin, Fengwei
2023-07-28 17:24 ` [PATCH 0/2] don't use mapcount() to check large folio sharing Andrew Morton
2023-08-02 12:39   ` Yin, Fengwei
2023-08-04  7:14     ` Yin, Fengwei
2023-08-07 16:43       ` Andrew Morton
2023-08-08  0:02         ` Yin, Fengwei
2023-08-02 10:27 ` Ryan Roberts
2023-08-02 10:48   ` David Hildenbrand
2023-08-02 11:20     ` Ryan Roberts
2023-08-02 11:36       ` David Hildenbrand
2023-08-02 11:51         ` Ryan Roberts
2023-08-02 11:52           ` David Hildenbrand
2023-08-02 12:35   ` Yin, Fengwei
2023-08-02 12:40     ` Ryan Roberts
2023-08-02 12:42       ` Yin, Fengwei
2023-08-02 12:49         ` Ryan Roberts
2023-08-02 12:55           ` Yin, Fengwei
2023-08-03 20:46             ` Yu Zhao
2023-08-03 23:27               ` Yin, Fengwei
2023-08-03 23:38                 ` Yu Zhao
2023-08-04  0:17                   ` Yin, Fengwei
2023-08-04  7:31                     ` David Hildenbrand
2023-08-04  7:36                       ` Yin, Fengwei
2023-08-04  8:11                       ` Yin, Fengwei
2023-08-02 12:43       ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox