From: Jens Axboe <jens.axboe@oracle.com>
To: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: CLONE_IO documentation
Date: Mon, 14 Apr 2008 19:13:30 +0200 [thread overview]
Message-ID: <20080414171330.GP12774@kernel.dk> (raw)
In-Reply-To: <cfd18e0f0804140540i1c6f035o259a7c4635194f54@mail.gmail.com>
On Mon, Apr 14 2008, Michael Kerrisk wrote:
> Hi Jens,
>
> Could you supply some text describing CLONE_IO suitable for inclusion
> in the clone.2 man page?
> ( http://www.kernel.org/doc/man-pages/online/pages/man2/clone.2.html
> ). In that text it would be helpful to explain what an "I/O context"
> is.
Sure, I'll see if I can come up with something. Or perhaps you can help
me a bit, being the writer ;-)
If the CLONE_IO flag is set, the process will share the same io context.
The I/O context is the I/O scope of the disk scheduler. So if you think
of the I/O context as what the I/O scheduler uses to map to a process,
when CLONE_IO is set multiple processes will map to the same I/O context
and will be treated as one by the I/O scheduler. What this means is that
they get to share disk time. For the anticipatory and CFQ scheduler, if
process A and process B share I/O context, they will be allowed to
interleave their disk access. So if you have several threads doing I/O
on behalf of the same process (aio_read(), for instance), they should
set CLONE_IO to get better I/O performance with CFQ and AS.
A man page should not mention the specific schedulers, just mention that
it'll improve the information available to the kernel and the
performance of the app for the scenario described. In practice, it'll
only really apply to CFQ and AS. For deadline and noop, they'll be
essentially zero difference as they have no concept of I/O contexts.
--
Jens Axboe
next prev parent reply other threads:[~2008-04-14 17:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-14 12:40 CLONE_IO documentation Michael Kerrisk
2008-04-14 17:13 ` Jens Axboe [this message]
2008-11-19 22:30 ` Michael Kerrisk
2008-11-20 7:48 ` Jens Axboe
2008-11-20 11:52 ` Michael Kerrisk
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=20080414171330.GP12774@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@googlemail.com \
/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