From: Vladislav Bolkhovitin <vst@vlnb.net>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Fabio Checconi <fabio@gandalf.sssup.it>, linux-kernel@vger.kernel.org
Subject: Re: Dynamic switching of io_context
Date: Thu, 18 Dec 2008 16:47:24 +0300 [thread overview]
Message-ID: <494A546C.2020003@vlnb.net> (raw)
In-Reply-To: <20081218134006.GP32491@kernel.dk>
Jens Axboe, on 12/18/2008 04:40 PM wrote:
> On Wed, Dec 17 2008, Vladislav Bolkhovitin wrote:
>>> I haven't seen the rest of the code, so I may be wrong, but I suppose
>>> that a better approach would be to use CLONE_IO to share io contexts,
>>> if possible.
>> Unfortunately, it would be very non-optimal. As it is known, to achieve
>> the best performance with async. IO, it should be submitted by a limited
>> number of threads <= CPU count. So, the only way to submit IO from each
>> of, e.g. 100, clients in a dedicated per-client IO context is to
>> dynamically switch io_context of the current threads to io_context of
>> the client before IO submission.
>
> There's also likely to be another use of exactly the same type of thing
> - the acall patches from Zach. At least my vision of the punt-to-thread
> approach would be very similar: grab an available thread and attach it
> to a given IO context.
>
> So while I did mention exactly what Fabio outlines in my initial mail on
> this, a generic way to attach/detach IO contexts from processes/threads
> would be useful outside of this project. nfsd comes to mind as well.
I fully agree. Looking forward to use that facility in 2.6.29! (I guess,
from your reference on Zach's patches, that the work is being done. If
I'm wrong and you need my participation in implementing it, just let me
know.)
Thanks,
Vlad
prev parent reply other threads:[~2008-12-18 13:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-12 19:18 Dynamic switching of io_context Vladislav Bolkhovitin
[not found] ` <20081216082235.GD3284@gandalf.sssup.it>
2008-12-17 18:52 ` Vladislav Bolkhovitin
2008-12-18 13:40 ` Jens Axboe
2008-12-18 13:47 ` Vladislav Bolkhovitin [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=494A546C.2020003@vlnb.net \
--to=vst@vlnb.net \
--cc=fabio@gandalf.sssup.it \
--cc=jens.axboe@oracle.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