From: Tejun Heo <tj@kernel.org>
To: Hillf Danton <dhillf@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] replace ida in workqueue with page-sized buffer
Date: Sat, 8 Jan 2011 09:01:36 -0500 [thread overview]
Message-ID: <20110108140136.GA13269@mtj.dyndns.org> (raw)
In-Reply-To: <AANLkTim75ihzBKXx1e9NbPnECMrKUidOLWjVuBWHwiEP@mail.gmail.com>
Hello,
On Sat, Dec 18, 2010 at 09:10:18PM +0800, Hillf Danton wrote:
> The id of worker of global work queue is monitored with kernel library, ida.
>
> The ida in global work queue is redefined to be page-sized buffer,
> which is allocated when initializing workqueue.
>
> The new id allocator could monitor ids in the rage from 0 to INT_MAX.
> The buffer is used to store freed ids, and if the peak number of ids,
> in workqueue as whole, is not out of the capacity of the allocated
> buffer, there is no more allocation of buffer after initializing.
>
> The advantage looks that the new allocator runs faster.
I'm confused about why this is necessary. It's not like workqueue ID
alloc/dealloc is hot path to begin with (they're quite lazy) and
during worker creation / destruction ida is a quite insignificant
part, so what is it trying to optimize? It's not like ida allocator
is slow to begin with.
Also, the allocator looks quite dubious.
* What happens if more entries than what can fit in a page are freed?
It'll just lose track of it.
* ida guarantees that always the lowest available slot is allocated.
The new allocator doesn't.
So, why oh why?
--
tejun
next prev parent reply other threads:[~2011-01-08 14:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-18 13:10 Hillf Danton
2011-01-08 2:17 ` Hillf Danton
2011-01-08 11:57 ` Ingo Molnar
2011-01-09 2:39 ` Hillf Danton
2011-01-08 14:01 ` Tejun Heo [this message]
2011-01-09 3:13 ` Hillf Danton
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=20110108140136.GA13269@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=dhillf@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®