Skip to contentSkip to conversation

memcg-optimize-the-search-everything-else-loop-in-mm_update_next_owner.patch removed from -mm tree

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

lore
Share & tools
lore
#0 lore raw

Subject: [merged] memcg-optimize-the-search-everything-else-loop-in-mm_update_next_owner.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 05 Jun 2014 12:50:48 -0700

The patch titled
Subject: memcg: optimize the "Search everything else" loop in mm_update_next_owner()
has been removed from the -mm tree. Its filename was
memcg-optimize-the-search-everything-else-loop-in-mm_update_next_owner.patch

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

------------------------------------------------------
From: Oleg Nesterov <[email protected]>
Subject: memcg: optimize the "Search everything else" loop in mm_update_next_owner()

for_each_process_thread() is sub-optimal. All threads share the same ->mm, we can swicth to the next process once we found a thread with ->mm != NULL and ->mm != mm.

Cc Balbir Singh <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Peter Chiang <[email protected]>

---

 kernel/exit.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
kernel/exit.c renamed from kernel/exit.c~memcg-optimize-the-search-everything-else-loop-in-mm_update_next_owner +9 -3
diff -puN kernel/exit.c~memcg-optimize-the-search-everything-else-loop-in-mm_update_next_owner kernel/exit.c
@@ -397,9 +397,15 @@ retry:
 	/*
 	 * Search through everything else, we should not get here often.
 	 */
-	for_each_process_thread(g, c) {
-		if (!(c->flags & PF_KTHREAD) && c->mm == mm)
-			goto assign_new_owner;
+	for_each_process(g) {
+		if (g->flags & PF_KTHREAD)
+			continue;
+		for_each_thread(g, c) {
+			if (c->mm == mm)
+				goto assign_new_owner;
+			if (c->mm)
+				break;
+		}
 	}
 	read_unlock(&tasklist_lock);
 	/*

_

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

origin.patch ptrace-fix-fork-event-messages-across-pid-namespaces.patch ptrace-task_clear_jobctl_trapping-wake_up_bit-needs-mb.patch signals-kill-sigfindinword.patch signals-s-siginitset-sigemptyset-in-do_sigtimedwait.patch signals-kill-rm_from_queue-change-prepare_signal-to-use-for_each_thread.patch signals-rename-rm_from_queue_full-to-flush_sigqueue_mask.patch signals-cleanup-the-usage-of-t-current-in-do_sigaction.patch signals-mv-disallow_signal-from-schedh-exitc-to-signal.patch signals-jffs2-fix-the-wrong-usage-of-disallow_signal.patch signals-kill-the-obsolete-sigdelset-and-recalc_sigpending-in-allow_signal.patch signals-disallow_signal-should-flush-the-potentially-pending-signal.patch signals-introduce-kernel_sigaction.patch signals-change-wait_for_helper-to-use-kernel_sigaction.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 kernel-user_namespacec-kernel-doc-checkpatch-fixes.patch linux-next.patch kernel-watchdogc-print-traces-for-all-cpus-on-lockup-detection.patch kernel-watchdogc-print-traces-for-all-cpus-on-lockup-detection-fix.patch nmi-provide-the-option-to-issue-an-nmi-back-trace-to-every-cpu-but-current.patch nmi-provide-the-option-to-issue-an-nmi-back-trace-to-every-cpu-but-current-fix.patch