From: Florian Mickler <florian@mickler.org>
To: Tejun Heo <tj@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Christoph Lameter <cl@linux-foundation.org>,
Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH UPDATED] workqueue: add documentation
Date: Thu, 9 Sep 2010 20:50:56 +0200 [thread overview]
Message-ID: <20100909205056.1ac7989a@schatten.dmk.lab> (raw)
In-Reply-To: <4C88B55E.90203@kernel.org>
On Thu, 09 Sep 2010 12:22:22 +0200
Tejun Heo <tj@kernel.org> wrote:
> The backend mechanism is called Global CPU Workqueue (gcwq). There is
I tried to avoid that name. It somehow is confusing to me . Global/Local
in context of CPU is somehow associated with CPU locality in my mind.
Also the name doesn't fit for the unbound gcwq.
I know what you mean by it, but I don't think it's a self explanatory
name. That was why I just said "they are called gcwq". But I'm ok with
it either way. After all, that _is_ how they are called. :)
> >
> > I think it is worth mentioning all functions that are considered to be
> > part of the API here.
>
> Yeah, that would be nice but a slightly larger task that I would like
> to postpone at this point. :-)
Ah well, I may just give it a go then...
>
> > "Unless work items are expected to consume a huge amount of CPU
> > cycles, using a bound wq is usually beneficial due to the increased
> > level of locality in wq operations and work item exection. "
>
> So updated.
>
> > Btw, it is not clear to me, what you mean with "wq operations".
>
> Queueing, dispatching and other book keeping operations.
Yes. That makes sense.
>
> > Do the enqueuing API functions automatically determine the cpu they are
> > executed on and queue the workitem to the corresponding gcwq? Or do you
> > need to explicitly queue to a specific CPU?
> >
> > Either you mean the operations that lead to the enqueueing of the
> > work-item, or you mean the operations done by the thread-pool?
> >
> > ... after thinking a bit, the wq implementation should obviously do the
> > automatic enqueuing on the nearest gcwq thingy... But that should
> > probably be mentioned in the API description.
> > Although I have to admit I only skimmed over the flag description
> > above it seems you only mention the UNBOUND case and not the default
> > one?
>
> Yeah, queue_work() queues works on the gcwq of the local CPU. It can
> be overridden by queue_work_on(). The unbound is special case where
> the workqueue always sends works to the unbound gcwq which is served
> by unbound workers. Did the update in the design section explain
> enough or do you think there needs to be more explanation?
I'm looking forward to reading the new version en
bloc, but if I can trust my gut feeling, I'm ok with it now. :)
Let's see if someone else with more kernel-experience has something to
add, but here you've got my
Reviewed-By: Florian Mickler <florian@mickler.org>
in any case.
Cheers,
Flo
next prev parent reply other threads:[~2010-09-09 18:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 15:40 [PATCH] workqueue: add documentation Tejun Heo
2010-09-08 15:51 ` [PATCH UPDATED] " Tejun Heo
2010-09-09 8:02 ` Florian Mickler
2010-09-09 10:22 ` Tejun Heo
2010-09-09 18:50 ` Florian Mickler [this message]
2010-09-10 10:25 ` Tejun Heo
2010-09-10 14:26 ` Florian Mickler
2010-09-10 14:55 ` Tejun Heo
2010-09-10 17:43 ` Randy Dunlap
2010-09-12 10:50 ` Tejun Heo
2010-09-13 0:51 ` Dave Chinner
2010-09-13 8:08 ` Tejun Heo
2010-09-13 8:16 ` Florian Mickler
2010-09-13 8:27 ` Tejun Heo
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=20100909205056.1ac7989a@schatten.dmk.lab \
--to=florian@mickler.org \
--cc=cl@linux-foundation.org \
--cc=david@fromorbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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