From: Rusty Russell <rusty@rustcorp.com.au>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: npiggin@suse.de, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>,
Christoph Lameter <cl@linux-foundation.org>
Subject: Re: [PATCH 1/1] MM: slqb, fix per_cpu access
Date: Wed, 4 Nov 2009 18:15:52 +1030 [thread overview]
Message-ID: <200911041815.53431.rusty@rustcorp.com.au> (raw)
In-Reply-To: <4AEEFB5D.9080009@gmail.com>
On Tue, 3 Nov 2009 02:01:41 am Jiri Slaby wrote:
> >> - 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.
OK, sure. It's not worth changing unless you were doing a rename anyway.
> 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.
This is getting pedantic and marginal, but the word "work" already appears
everywhere this var is used. Either "XXX->work", or "INIT_DELAYED_WORK(XXX"
or "scheduled_delayed_work_on(cpu, XXX".
That's why I think the word "work" in unnecessary.
Hope that clarifies why I preferred "trim".
Rusty.
--
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>
prev parent reply other threads:[~2009-11-04 7:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-01 22:12 Jiri Slaby
2009-11-02 4:22 ` Tejun Heo
2009-11-02 8:49 ` Jiri Slaby
2009-11-02 11:48 ` Dave Young
2009-11-02 15:24 ` Tejun Heo
2009-11-02 16:24 ` Christoph Lameter
2009-11-02 13:23 ` Rusty Russell
2009-11-02 15:31 ` Jiri Slaby
2009-11-04 7:45 ` Rusty Russell [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=200911041815.53431.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=cl@linux-foundation.org \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=tj@kernel.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