All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin LaHaise <bcrl@kvack.org>
To: Suparna Bhattacharya <suparna@in.ibm.com>
Cc: linux-aio@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: aio_down() patch series -- cancellation support added
Date: Thu, 23 Jun 2005 12:41:37 -0400	[thread overview]
Message-ID: <20050623164137.GA5279@kvack.org> (raw)
In-Reply-To: <20050623132926.GA6669@in.ibm.com>

On Thu, Jun 23, 2005 at 06:59:26PM +0530, Suparna Bhattacharya wrote:
> One quick question.
> Since lock_kiocb() may block, does that mean that the aio worker thread
> could be put to sleep while an iocb cancellation is in progress, even though
> there may be other iocbs/ioctx's to process ?

It's mostly to deal with the case in the other direction: an iocb that is 
in the process of being cancelled somehow needs to block any retries from 
occurring.  Likewise, if a retry was in progress, the cancellation needs 
to be blocked until that retry is complete.  It should be sufficiently 
rare that it's not a problem, but we may have to revisit the issue as more 
cancel methods get written.

> Looking at the rest a little more closely in terms of how everything
> will fit together, a few questions come to mind - need to think
> about it a little more. I guess the main reason you need the aio_down_wait
> callback is to make sure the semaphore is grabbed right in the context
> of the wakeup rather than at retry time, is that correct ?

Yes, that way the retry method is only called if it will make progress, 
and we will not have a thundering herd problem.  I'm debugging the changes 
needed to implement async pipes using aio_down(), and the patch so far 
looks pretty straightforward.

		-ben
-- 
"Time is what keeps everything from happening all at once." -- John Wheeler

      reply	other threads:[~2005-06-23 16:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050620213835.GA6628@kvack.org>
2005-06-20 21:46 ` aio_down() patch series -- cancellation support added Benjamin LaHaise
2005-06-23 13:29   ` Suparna Bhattacharya
2005-06-23 16:41     ` Benjamin LaHaise [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=20050623164137.GA5279@kvack.org \
    --to=bcrl@kvack.org \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suparna@in.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.