Messages in this thread | | | Date | Mon, 02 Nov 2009 16:31:41 +0100 | From | Jiri Slaby <> | Subject | Re: [PATCH 1/1] MM: slqb, fix per_cpu access |
| |
On 11/02/2009 02:23 PM, Rusty Russell wrote: >> --- a/mm/slqb.c >> +++ b/mm/slqb.c >> @@ -2770,16 +2770,16 @@ static DEFINE_PER_CPU(struct delayed_work, cache_trim_work); >> >> static void __cpuinit start_cpu_timer(int cpu) >> { >> - struct delayed_work *cache_trim_work = &per_cpu(cache_trim_work, cpu); >> + struct delayed_work *_cache_trim_work = &per_cpu(cache_trim_work, cpu); >> >> /* >> * When this gets called from do_initcalls via cpucache_init(), >> * init_workqueues() has already run, so keventd will be setup >> * at that time. >> */ >> - if (keventd_up() && cache_trim_work->work.func == NULL) { >> - INIT_DELAYED_WORK(cache_trim_work, cache_trim_worker); >> - schedule_delayed_work_on(cpu, cache_trim_work, >> + if (keventd_up() && _cache_trim_work->work.func == NULL) { >> + INIT_DELAYED_WORK(_cache_trim_work, cache_trim_worker); >> + schedule_delayed_work_on(cpu, _cache_trim_work, >> __round_jiffies_relative(HZ, cpu)); > > How about calling the local var "trim"? > > This actually makes the code more readable, IMHO.
Please ignore this version of the patch. After this I sent a new one which changes the global var name.
So the local variable is untouched there. If you want me to perform the cleanup, let me know. In any case I'd make it trim_work instead of trim which makes more sense to me.
| |