summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorBarry Song <v-songbaohua@oppo.com>2024-06-30 01:41:55 +0200
committerAndrew Morton <akpm@linux-foundation.org>2024-07-10 21:14:55 +0200
commite5a119c4a6835a53f93fcfba6c177daef58467e3 (patch)
tree6980fab937aa8762dc94601b68b308405b83a9ac /mm
parentmm/page_alloc: remove prefetchw() on freeing page to buddy system (diff)
downloadlinux-e5a119c4a6835a53f93fcfba6c177daef58467e3.tar.xz
linux-e5a119c4a6835a53f93fcfba6c177daef58467e3.zip
mm/vmscan: drop checking if _deferred_list is empty before using TTU_SYNC
The optimization of list_empty(&folio->_deferred_list) aimed to prevent increasing the PTL duration when a large folio is partially unmapped, for example, from subpage 0 to subpage (nr - 2). But Ryan's commit 5ed890ce5147 ("mm: vmscan: avoid split during shrink_folio_list()") actually splits this kind of large folios. This makes the "optimization" useless. Additionally, the list_empty() technically required a data_race() annotation. Link: https://lkml.kernel.org/r/20240629234155.53524-1-21cnbao@gmail.com Signed-off-by: Barry Song <v-songbaohua@oppo.com> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/vmscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 3d4c681c6d40..0761f91b407f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1291,7 +1291,7 @@ retry:
* try_to_unmap acquire PTL from the first PTE,
* eliminating the influence of temporary PTE values.
*/
- if (folio_test_large(folio) && list_empty(&folio->_deferred_list))
+ if (folio_test_large(folio))
flags |= TTU_SYNC;
try_to_unmap(folio, flags);