From: jgmyers@netscape.com (John Myers)
To: Scot McKinley <scot.mckinley@oracle.com>
Cc: Joel Becker <jlbec@evilplan.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-aio@kvack.org" <linux-aio@kvack.org>
Subject: Re: [PATCH 2.5.71-mm1] aio process hang on EINVAL
Date: Thu, 19 Jun 2003 13:54:25 -0700 [thread overview]
Message-ID: <3EF22301.1000003@netscape.com> (raw)
In-Reply-To: <3EF11662.2060102@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 2079 bytes --]
Scot McKinley wrote:
> > The kernel could
> > even detect success during queuing if it really tried.
>
> Yes, this is also a good thing, as i mentioned in my earlier message.
> ie, if the io has ALREADY completed, return it immediately.
io_submit() is incapable of returning operation success notifications.
It can only return notifications of idempotent errors, since callers who
submit multiple requests might need to call io_submit() twice to find
out what the error was.
> Yes, the program WILL be able to handle async completions, obviously,
> since
> it attempting aio submissions. However, it MAY also be able to handle
> synchronous/immediate completions of its aio submissions.
"MAY" is far cry from "MUST". I object strongly to requiring all
callers to io_submit() to be able to handle immediate completions. In
my aio framework, the caller of io_submit() is not in a context where it
can invoke completion callbacks, since completion callbacks are not
required to be reentrant.
Adding an optional facility to permit callers to receive immediate
completions is a different issue.
> > So? That is a miniscule amount of resources used by an extremely rare
> > condition. Such a picayune optimization hardly justifies the necessary
> > increase in complexity.
>
> It may not be miniscule.
For the specific conditions under discussion, it was. The conditions
were certainly extremely rare.
> As we expand the ability to do aio to network
> descriptors, the transport that we are utilizing could easily have a
> "bcopy threshold" (a bcopy thresheld, for those that don't know, is the
> threshold under which all io will be done synchronously.
The traditional way of dealing with this is to first call the
synchronous nonblocking interface, retrying with the asynchronous
interface only when the nonblocking one indicates no progress. Not only
does this save the cost of the (expensive when poll-based) queuing
overhead, it can save the cost of operations required only when going
async, such as copying the data from the stack to the heap.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3941 bytes --]
next prev parent reply other threads:[~2003-06-19 20:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-17 0:43 [PATCH 2.5.71-mm1] aio process hang on EINVAL Daniel McNeil
2003-06-17 1:33 ` John Myers
2003-06-17 3:24 ` Suparna Bhattacharya
2003-06-17 18:31 ` John Myers
2003-06-17 21:06 ` Daniel McNeil
2003-06-18 0:03 ` John Myers
2003-06-18 0:15 ` Joel Becker
2003-06-18 0:25 ` John Myers
2003-06-18 0:42 ` Joel Becker
2003-06-19 0:33 ` John Myers
2003-06-19 0:41 ` Joel Becker
2003-06-19 0:58 ` John Myers
2003-06-19 1:48 ` Scot McKinley
2003-06-19 20:54 ` John Myers [this message]
2003-06-19 22:42 ` Scot McKinley
2003-06-18 5:11 ` Scot McKinley
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=3EF22301.1000003@netscape.com \
--to=jgmyers@netscape.com \
--cc=jlbec@evilplan.org \
--cc=linux-aio@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=scot.mckinley@oracle.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