linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-mm@kvack.org
Subject: Re: drain_node_pages: interrupt latency reduction / optimization
Date: Fri, 10 Mar 2006 16:15:40 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0603101605410.31461@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20060310160527.5ddfc610.akpm@osdl.org>

On Fri, 10 Mar 2006, Andrew Morton wrote:

> But I _think_ we're OK for now because these functions are only ever called
> from pinned-to-cpu kernel threads.

Right. This function must be called that way otherwise it is useless. We 
should use raw_smp_processor_id().

> Please test all this with CONFIG_PREEMPT_DEBUG, confirm that it's OK.

Will do that on Monday but if this would not stay on a processor then 
other things in the slab allocator would also break.

Here is a fixup adding some comments and raw_smp_processor_id()

Signed-off-by: Christoph Lameter <clameter@sgi.com>

Index: linux-2.6/mm/page_alloc.c
===================================================================
--- linux-2.6.orig/mm/page_alloc.c	2006-03-10 16:09:10.000000000 -0800
+++ linux-2.6/mm/page_alloc.c	2006-03-10 16:10:07.000000000 -0800
@@ -593,6 +593,8 @@ static int rmqueue_bulk(struct zone *zon
 /*
  * Called from the slab reaper to drain pagesets on a particular node that
  * belong to the currently executing processor.
+ * Note that this function must be called with the thread pinned to
+ * a processor.
  */
 void drain_node_pages(int nodeid)
 {
@@ -603,7 +605,7 @@ void drain_node_pages(int nodeid)
 		struct zone *zone = NODE_DATA(nodeid)->node_zones + z;
 		struct per_cpu_pageset *pset;
 
-		pset = zone_pcp(zone, smp_processor_id());
+		pset = zone_pcp(zone, raw_smp_processor_id());
 		for (i = 0; i < ARRAY_SIZE(pset->pcp); i++) {
 			struct per_cpu_pages *pcp;
 
 

--
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:[~2006-03-11  0:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-10 20:59 Christoph Lameter
2006-03-11  0:05 ` Andrew Morton
2006-03-11  0:15   ` Christoph Lameter [this message]
2006-03-11  0:28     ` Andrew Morton
2006-03-11  0:33       ` 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=Pine.LNX.4.64.0603101605410.31461@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@osdl.org \
    --cc=linux-mm@kvack.org \
    /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