mm-swap-use-smp_mb__after_atomic-to-order-lru-bit-set.patch removed from -mm tree
The patch titled
Subject: mm: swap: use smp_mb__after_atomic() to order LRU bit set
has been removed from the -mm tree. Its filename was
mm-swap-use-smp_mb__after_atomic-to-order-lru-bit-set.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Yang Shi <[email protected]>
Subject: mm: swap: use smp_mb__after_atomic() to order LRU bit set
Memory barrier is needed after setting LRU bit, but smp_mb() is too strong. Some architectures, i.e. x86, imply memory barrier with atomic operations, so replacing it with smp_mb__after_atomic() sounds better, which is nop on strong ordered machines, and full memory barriers on others. With this change the vm-scalability cases would perform better on x86, I saw total 6% improvement with this patch and previous inline fix.
The test data (lru-file-readtwice throughput) against v5.6-rc4:
mainline w/ inline fix w/ both (adding this) 150MB 154MB 159MB
---
mm/swap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/swap.c renamed from mm/swap.c~mm-swap-use-smp_mb__after_atomic-to-order-lru-bit-set +2 -2
@@ -931,7 +931,6 @@ static void __pagevec_lru_add_fn(structVM_BUG_ON_PAGE (PageLRU (page), page); -SetPageLRU (page);/* * Page becomes evictable in two ways: * 1) Within LRU lock [munlock_vma_page() and __munlock_pagevec()].
@@ -958,7 +957,8 @@ static void __pagevec_lru_add_fn(struct* looking at the same page) and the evictable page will be stranded * in an unevictable LRU. */ -smp_mb (); +SetPageLRU (page); +smp_mb__after_atomic ();if (page_evictable (page)) { lru =page_lru (page);
_
Patches currently in -mm which might be from [email protected] are
mm-migratec-migrate-pg_readahead-flag.patch