From: Jens Axboe <axboe@suse.de>
To: gopi krishna <mgopi@indiainfo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: device plugging
Date: Sat, 7 Jul 2001 12:27:00 +0200 [thread overview]
Message-ID: <20010707122700.C16505@suse.de> (raw)
In-Reply-To: <web-26606962@indiainfo.com>
In-Reply-To: <web-26606962@indiainfo.com>
On Sat, Jul 07 2001, gopi krishna wrote:
> Why do we need a dummy req for plugging.
> As i understood only thing plugging does is to, on arrival of new req if
> the dev queue is empty, puts a dummy req on the queue, and schedules the
> unplug routine on tq_disk, which on being scheduled calls the strategy
> routine.
You are reading 2.2 sources, maybe try the 2.4 sources as they are
easier to follow in this regard IMHO.
What happens is that we assign dev->current_request &dev->plug, so that
the front request is recognizable as the 'plug' and not a valid request.
You seem to completely misunderstand plugging -- if we just put the new
request on the queue and scheduled tq_disk, then there would be no
plugging going on at all. What we do instead is add this specific 'plug
request' and queue lots of stuff behind that. Not until someone needs
the data on the queue is the 'plug request' removed and the request_fn
run. This happens for instance if _someone else_ calls tq_disk,
typically __wait_on_buffer.
> So we can as well put the new req on the queue without dummy req.
Wrong
> If i'm incorrect please explain what's exact process and the reason
See?
--
Jens Axboe
next prev parent reply other threads:[~2001-07-07 10:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-07 5:40 device plugging gopi krishna
2001-07-07 10:27 ` Jens Axboe [this message]
2001-07-12 8:58 ` gopi krishna
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=20010707122700.C16505@suse.de \
--to=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mgopi@indiainfo.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