linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Benjamin LaHaise <bcrl@kvack.org>, Christoph Hellwig <hch@lst.de>,
	akpm@osdl.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] add support for vectored and async I/O to all simple filesystems
Date: Wed, 2 Nov 2005 20:31:05 +0000	[thread overview]
Message-ID: <20051102203105.GA20756@mail.shareable.org> (raw)
In-Reply-To: <20051102162904.GK23749@parisc-linux.org>

Matthew Wilcox wrote:
> On Wed, Nov 02, 2005 at 11:21:07AM -0500, Benjamin LaHaise wrote:
> > On Wed, Nov 02, 2005 at 11:06:30AM +0000, Jamie Lokier wrote:
> > > So it means that any program that mustn't block, must now have a
> > > stupid kernel version check to make sure it avoids even trying aio
> > > system calls?  I was under the impression that the right thing to do
> > > so far was try them, and when EINVAL is returned, use threads instead.
> > 
> > Yes, that is correct.
> 
> To be fair, the aio system calls were never _guaranteed_ to not block,
> were they?  ISTR there were various corner cases that would still get
> your task  blocking while doing an aio submission.

Could we have some documentation of when those corner cases occur?

The main point of aio, as far as I'm aware, is to avoid the need for
threads (or reduce the number of threads) in programs using I/O that
shouldn't block, particularly when they are latency sensitive too.

If aio has a habit of blocking from time to time, then it may still be
useful, but it would be helpful to know that multiple threads are
still needed to ensure a program (e.g. such as a HTTP or SMB server)
can continue to make progress - and more helpful to know when.

One particular question is: can aio calls block for a long time due to
network delays (e.g. over NFS) and I/O delays (e.g. slow disk or CD),
or are the corner cases restricted to things like paging during memory
allocation, which is unavoidable one way or another anyway?

-- Jamie

  parent reply	other threads:[~2005-11-02 20:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-01  2:36 [PATCH] add support for vectored and async I/O to all simple filesystems Christoph Hellwig
2005-11-01 10:28 ` Miklos Szeredi
2005-11-01 15:27   ` Christoph Hellwig
2005-11-01 17:19     ` Miklos Szeredi
2005-11-07  5:00       ` Christoph Hellwig
2005-11-01 19:20 ` Jamie Lokier
2005-11-01 20:57   ` Benjamin LaHaise
2005-11-02 11:06     ` Jamie Lokier
2005-11-02 16:21       ` Benjamin LaHaise
2005-11-02 16:29         ` Matthew Wilcox
2005-11-02 16:45           ` Benjamin LaHaise
2005-11-02 20:31           ` Jamie Lokier [this message]
2005-11-02 21:04             ` Anton Altaparmakov
2005-11-02 23:36               ` Jamie Lokier
2005-11-05  0:18   ` Christoph Hellwig

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=20051102203105.GA20756@mail.shareable.org \
    --to=jamie@shareable.org \
    --cc=akpm@osdl.org \
    --cc=bcrl@kvack.org \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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;
as well as URLs for NNTP newsgroup(s).