linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Dimitri Sivanich <sivanich@sgi.com>
Cc: manfred@colorfullife.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] Improve cache_reap hotplug cpu support
Date: Thu, 19 Aug 2004 13:37:14 -0700	[thread overview]
Message-ID: <20040819133714.7e2dbfd1.akpm@osdl.org> (raw)
In-Reply-To: <20040819202652.GA11050@sgi.com>

Dimitri Sivanich <sivanich@sgi.com> wrote:
>
> I found that there was room for improvement in the hotplug cpu code
> in cache_reap.

"improvement" is not an adequate description for your change, and it is
unobvious from the diff what it is intended to do, and why, and what the
expected and observed results were.

Please describe your work more carefully.


The patch adds even more ifdefs.  Suggest you open-code this:

> +#ifdef CONFIG_HOTPLUG_CPU
> +static void stop_cpu_timer(int cpu)
> +{
> +	struct work_struct *reap_work = &per_cpu(reap_work, cpu);
> +
> +	/* Null out this otherwise unused pointer for checking in cache_reap */
> +	reap_work->data = NULL;
> +}
> +#endif

in here:

>  static struct array_cache *alloc_arraycache(int cpu, int entries, int batchcount)
>  {
>  	int memsize = sizeof(void*)*entries+sizeof(struct array_cache);
> @@ -670,6 +680,7 @@ static int __devinit cpuup_callback(stru
>  		break;
>  #ifdef CONFIG_HOTPLUG_CPU
>  	case CPU_DEAD:
> +		stop_cpu_timer(cpu);
>  		/* fall thru */
>  	case CPU_UP_CANCELED:
>  		down(&cache_chain_sem);

thereby removing one of them.

--
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:"aart@kvack.org"> aart@kvack.org </a>

      reply	other threads:[~2004-08-19 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-19 20:26 Dimitri Sivanich
2004-08-19 20:37 ` Andrew Morton [this message]

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=20040819133714.7e2dbfd1.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=manfred@colorfullife.com \
    --cc=sivanich@sgi.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