lkml.org 
[lkml]   [2008]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Dynamic switching of io_context
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




\
 
 \ /
  Last update: 2008-12-18 14:49    [W:0.045 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site