Thread (6 messages) 6 messages, 3 authors, 2016-02-24

Re: [patch 2/2] vmstat: Get rid of the ugly cpu_stat_off variable

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2016-02-24 00:23:48

On Mon, 22 Feb 2016 12:10:42 -0600 Christoph Lameter [off-list ref] wrote:
The cpu_stat_off variable is unecessary since we can check if
a workqueue request is pending otherwise. This makes it pretty
easy for the shepherd to ensure that the proper things happen.

Removing the state also removes all races related to it.
Should a workqueue not be scheduled as needed for vmstat_update
then the shepherd will notice and schedule it as needed.
Should a workqueue be unecessarily scheduled then the vmstat
updater will disable it.

Thus vmstat_idle can also be simplified.
I'm getting rather a lot of rejects from this one.
quoted hunk ↗ jump to hunk
 
@@ -1436,11 +1426,8 @@ void quiet_vmstat(void)
 	if (system_state != SYSTEM_RUNNING)
 		return;
 
-	do {
-		if (!cpumask_test_and_set_cpu(smp_processor_id(), cpu_stat_off))
-			cancel_delayed_work(this_cpu_ptr(&vmstat_work));
-
-	} while (refresh_cpu_vm_stats(false));
+	refresh_cpu_vm_stats(false);
+	cancel_delayed_work(this_cpu_ptr(&vmstat_work));
 }
I can't find a quiet_vmstat() which looks like this.  What tree are you
patching?


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help