public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Dipankar Sarma <dipankar@sequent.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: io_request_lock patch?
Date: Wed, 11 Jul 2001 10:47:45 +0200	[thread overview]
Message-ID: <20010711104745.E17314@suse.de> (raw)
In-Reply-To: <20010710172545.A8185@in.ibm.com> <20010711091900.C17314@suse.de> <20010711140923.A9220@in.ibm.com>
In-Reply-To: <20010711140923.A9220@in.ibm.com>

On Wed, Jul 11 2001, Dipankar Sarma wrote:
> > > It also seems that __make_request() holds the lock for the largest
> > > amount of time. This hold time isn't likely to change significantly
> > 
> > __make_request -> elevator merge/insertion scan. This is what is taking
> > all the time, not __make_request itself. With the bio-XX patches I have
> > completely eliminated merge scans, so that can be done in O(1) time. For
> > now insertion is still a O(N) scan, maybe that will change too [1].
> 
> I haven't got as far down as the elevator algorithm yet, but I would
> like to, at some point in time. In any case, my point was that because
> of disk block sorting done during initial queueing, there is likely
> to be a slightly longer lock (per-queue or otherwise) hold time there
> compared to, say, dequeueing for dispatch to lowlevel drivers.

That's exactly right. The merging/insertion is O(N) now, so for queueing
100 buffers it will take some time. Especially for bigger hardware,
where we allocate a much bigger freelist (and potentially get very long
queues). Dequeueing is O(1) always, and thus doesn't hold the lock for
long.

> Where can I get the bio patches from ?

kernel.org/pub/linux/kernel/people/axboe/v2.5

wait for bio-14 final though.

> > > for a per-queue lock, but atleast it will not affect queueing i/o
> > > requests to other devices. Besides, I am not sure if blk_get_queue()
> > > really needs to grab the io_request_lock. blk_dev[] entries aren't
> > 
> > Funny, this is one thing I've been looking at too. blk_get_queue _will_
> > die, don't worry. And yes, ie at open we can assign the queue. Or simply
> > map it and protect it otherwise. It all ties in with being able to up or
> > down a queue too, currently grabbing io_request_lock from blk_get_queue
> > accomplishes exactly nothing and may as well be removed. If you do that,
> > does it change the contention numbers significantly?
> 
> I haven't yet experimented with this yet, but theoritically speaking
> yes, it should make a big difference. blk_get_queue() grabs the lock
> very often and holds it for a very short period of time on average,
> so it is the one that is affected most. Out of the 30 seconds of
> spin-wait for io_request_lock, blk_get_queue() seems to take up
> 610820*60.2%*72us = 26.5 seconds. I will get to this soon though.

In that case, I'll make sure to rip it out immediately in the stock
kernel too. You'll note that the bio-XX patches don't use it either, and
haven't for some time.

> BTW, where can I get some of these lock-splitting patches from ? I
> can do one myself for scsi+aic7xxx, but if there already exist some 
> work, I would like to start off with them.

I have some old patches somewhere, but no chance of them applying now.
It's mostly a case of s/io_request_lock/q->queue_lock in some way for
all cases, so it's probably just as easy if you do it yourself for
testing.

-- 
Jens Axboe


  reply	other threads:[~2001-07-11  8:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-10 11:55 io_request_lock patch? Dipankar Sarma
2001-07-10 23:05 ` Mike Anderson
2001-07-11  7:15   ` Jens Axboe
2001-07-11  8:53   ` Dipankar Sarma
2001-07-11  8:53     ` Jens Axboe
2001-07-11 14:02       ` Dipankar Sarma
2001-07-11 14:01         ` Jens Axboe
2001-07-11 14:55           ` Dipankar Sarma
2001-07-11 19:16             ` Jens Axboe
2001-07-11 16:02     ` Mike Anderson
2001-07-11 19:20       ` Jens Axboe
2001-07-11 20:13         ` Dipankar Sarma
2001-07-11 20:17           ` Jens Axboe
2001-07-11 21:05             ` Mike Anderson
2001-07-11  7:19 ` Jens Axboe
2001-07-11  8:39   ` Dipankar Sarma
2001-07-11  8:47     ` Jens Axboe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-07-09 19:39 Jonathan Lahr
2001-07-09 19:44 ` Jens Axboe
2001-07-10 19:49   ` Jonathan Lahr
2001-07-10 20:09     ` Eric Youngdale
2001-07-11  8:05       ` Jens Axboe

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=20010711104745.E17314@suse.de \
    --to=axboe@suse.de \
    --cc=dipankar@sequent.com \
    --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