linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>,
	linux-mm@kvack.org, ghaskins@londonstockexchange.com,
	niv@us.ibm.com, kravetz@us.ibm.com,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: vmstat kthreads
Date: Wed, 19 Jun 2013 20:18:18 +0000	[thread overview]
Message-ID: <0000013f5e167883-3b022396-6162-4079-b80d-789b797e5ecb-000000@email.amazonses.com> (raw)
In-Reply-To: <20130619145906.GB5146@linux.vnet.ibm.com>

On Wed, 19 Jun 2013, Paul E. McKenney wrote:

> > I've just ported them over to 3.10 and they merge (with a small fix
> > due to deferred workqueue API changes) and build. I did not try to run
> > this version though.
> > I'll post them as replies to this message.
> >
> > I'd be happy to rescue them from the "TODO" pile... :-)
>
> Please!  ;-)

Well if we are going into vmstat mods then I'd also like to throw in this
old patch:

Subject: vmstat: Avoid interrupt disable in vm stats loop

There is no need to disable interrupts if we use xchg().

Signed-off-by: Christoph Lameter <cl@linux.com>

Index: linux/mm/vmstat.c
===================================================================
--- linux.orig/mm/vmstat.c	2013-05-20 15:19:28.000000000 -0500
+++ linux/mm/vmstat.c	2013-06-19 10:09:09.954024071 -0500
@@ -445,13 +445,8 @@ void refresh_cpu_vm_stats(int cpu)

 		for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
 			if (p->vm_stat_diff[i]) {
-				unsigned long flags;
-				int v;
+				int v = xchg(p->vm_stat_diff + i, 0);

-				local_irq_save(flags);
-				v = p->vm_stat_diff[i];
-				p->vm_stat_diff[i] = 0;
-				local_irq_restore(flags);
 				atomic_long_add(v, &zone->vm_stat[i]);
 				global_diff[i] += v;
 #ifdef CONFIG_NUMA

--
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>

  reply	other threads:[~2013-06-19 20:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 15:23 Paul E. McKenney
2013-06-18 17:46 ` Christoph Lameter
2013-06-18 18:26   ` Paul E. McKenney
2013-06-19 14:23     ` Christoph Lameter
2013-06-19 14:50       ` Gilad Ben-Yossef
2013-06-19 14:57         ` Gilad Ben-Yossef
2013-06-20  5:06           ` Gilad Ben-Yossef
2013-06-19 14:59         ` Paul E. McKenney
2013-06-19 20:18           ` Christoph Lameter [this message]
2013-06-19 20:02         ` [PATCH v2 1/2] mm: make vmstat_update periodic run conditional Gilad Ben-Yossef
2013-06-20 14:05           ` Christoph Lameter
2013-08-07 18:16             ` Christoph Lameter
2013-08-08  6:28               ` Gilad Ben-Yossef
2013-08-08  6:54             ` Gilad Ben-Yossef
2013-08-08 14:59               ` Christoph Lameter
2013-08-09 18:56                 ` Gilad Ben-Yossef
2013-08-28 19:28                   ` Christoph Lameter
2013-06-19 20:02         ` [PATCH v2 2/2] mm: add sysctl to pick vmstat monitor cpu Gilad Ben-Yossef
2013-06-20 13:58           ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0000013f5e167883-3b022396-6162-4079-b80d-789b797e5ecb-000000@email.amazonses.com \
    --to=cl@linux.com \
    --cc=fweisbec@gmail.com \
    --cc=ghaskins@londonstockexchange.com \
    --cc=gilad@benyossef.com \
    --cc=kravetz@us.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=niv@us.ibm.com \
    --cc=paulmck@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox