linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Peter T. Breuer" <ptb@it.uc3m.es>
To: cwidmer@iiic.ethz.ch
Cc: linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: does the request function block
Date: Tue, 28 Aug 2001 20:28:30 +0200 (CEST)	[thread overview]
Message-ID: <200108281828.UAA02042@nbd.it.uc3m.es> (raw)
In-Reply-To: <200108281813.f7SIDjY03688@mail.swissonline.ch> "from Christian Widmer at Aug 28, 2001 08:13:45 pm"

"Christian Widmer wrote:"
> does the request function of a bock device driver to be attomic or may it 
> block? in the linux device driver 2 it says that it must be attomic and 
> may not block. that makes sense to me since it also sais that the bottom-

It may not block - it's executed by the kernel in order to empty the
queue of requests for the device, and the kernel executes it with the
io lock held. So that's that. It can return without emptying the
queue, but that's another story. It must return immediately.

> half of the driver will call the request function too. but this is not realy
> nessesery when i remove all request before releasing the io_request_lock.

?? This seems to me to be orthogonal to to your question.

> on the other side block devices like nbd or brbd do send date using a socket
> in there request function.

No they don't. NBD moves the requests to an internal queue when the
request function is run. The function does not block. The internal
queue is later emptied by another means, in another context.

> who is right and why?

Well, since the hypothesis on which the question is based is mistaken,
it's hard to say!

Peter

  reply	other threads:[~2001-08-28 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-28 18:13 does the request function block Christian Widmer
2001-08-28 18:28 ` Peter T. Breuer [this message]
2001-08-28 19:15   ` Christian Widmer

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=200108281828.UAA02042@nbd.it.uc3m.es \
    --to=ptb@it.uc3m.es \
    --cc=cwidmer@iiic.ethz.ch \
    --cc=linux-kernel@vger.kernel.org \
    /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).