lkml.org 
[lkml]   [2004]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Improve cache_reap hotplug cpu support
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.033 / U:7.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site