]> www.infradead.org Git - users/willy/xarray.git/commit
mm/vmscan: drop checking if _deferred_list is empty before using TTU_SYNC
authorBarry Song <v-songbaohua@oppo.com>
Sat, 29 Jun 2024 23:41:55 +0000 (11:41 +1200)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 10 Jul 2024 19:14:55 +0000 (12:14 -0700)
commite5a119c4a6835a53f93fcfba6c177daef58467e3
tree6980fab937aa8762dc94601b68b308405b83a9ac
parent689d92cc81ac57ca6b674be8728b9c5ea5c725fd
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>
mm/vmscan.c