Skip to contentSkip to conversation

mm-shmem-avoid-atomic-operation-during-shmem_getpage_gfp.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jun 5, 2014

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [merged] mm-shmem-avoid-atomic-operation-during-shmem_getpage_gfp.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 05 Jun 2014 12:52:41 -0700

The patch titled
Subject: mm: shmem: avoid atomic operation during shmem_getpage_gfp
has been removed from the -mm tree. Its filename was
mm-shmem-avoid-atomic-operation-during-shmem_getpage_gfp.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Mel Gorman <[email protected]>
Subject: mm: shmem: avoid atomic operation during shmem_getpage_gfp

shmem_getpage_gfp uses an atomic operation to set the SwapBacked field before it's even added to the LRU or visible. This is unnecessary as what could it possible race against? Use an unlocked variant.

Cc Vlastimil Babka <[email protected]>
Cc Jan Kara <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Theodore Ts'o <[email protected]>
Cc "Paul E. McKenney" <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Peter Zijlstra <[email protected]>

---

 include/linux/page-flags.h |    1 +
 mm/shmem.c                 |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
include/linux/page-flags.h renamed from include/linux/page-flags.h~mm-shmem-avoid-atomic-operation-during-shmem_getpage_gfp +1 -0
diff -puN include/linux/page-flags.h~mm-shmem-avoid-atomic-operation-during-shmem_getpage_gfp include/linux/page-flags.h
@@ -208,6 +208,7 @@ PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinn
 PAGEFLAG(SavePinned, savepinned);			/* Xen */
 PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
 PAGEFLAG(SwapBacked, swapbacked) __CLEARPAGEFLAG(SwapBacked, swapbacked)
+	__SETPAGEFLAG(SwapBacked, swapbacked)
 
 __PAGEFLAG(SlobFree, slob_free)
 
mm/shmem.c renamed from mm/shmem.c~mm-shmem-avoid-atomic-operation-during-shmem_getpage_gfp +1 -1
diff -puN mm/shmem.c~mm-shmem-avoid-atomic-operation-during-shmem_getpage_gfp mm/shmem.c
@@ -1132,7 +1132,7 @@ repeat:
 			goto decused;
 		}
 
-		SetPageSwapBacked(page);
+		__SetPageSwapBacked(page);
 		__set_page_locked(page);
 		error = mem_cgroup_charge_file(page, current->mm,
 						gfp & GFP_RECLAIM_MASK);

_

Patches currently in -mm which might be from [email protected] are

origin.patch mm-introduce-do_shared_fault-and-drop-do_fault-fix-fix.patch mm-compactionc-isolate_freepages_block-small-tuneup.patch do_shared_fault-check-that-mmap_sem-is-held.patch smp-print-more-useful-debug-info-upon-receiving-ipi-on-an-offline-cpu.patch smp-print-more-useful-debug-info-upon-receiving-ipi-on-an-offline-cpu-fix.patch smp-print-more-useful-debug-info-upon-receiving-ipi-on-an-offline-cpu-v5.patch cpu-hotplug-smp-flush-any-pending-ipi-callbacks-before-cpu-offline.patch linux-next.patch