mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rq-dyn-alloc, dynamic request allocation
Date: Tue, 1 Apr 2003 02:45:48 -0800	[thread overview]
Message-ID: <20030401024548.715ff3c3.akpm@digeo.com> (raw)
In-Reply-To: <20030401102350.GG812@suse.de>

Jens Axboe <axboe@suse.de> wrote:
>
> Hi,
> 
> This patch adds dynamic request allocation to the block io path. On
> systems with lots of disks (and thus queues) it saves a non-significant
> amount of low memory. It also allows for much better experimentation
> with larger queue lengths, this experimental patch tops the queue depth
> off at 16384 (vs 128 before).

heh, 16k requests per queue?  Last time I played with 1024 certain popular
benchmarks ran like a bullet.

> Please play with it. Andrew, want a version for -mm?

Would be much appreciated, thanks.

>   */
>  static struct request *get_request_wait(request_queue_t *q, int rw)
>  {
> -	DEFINE_WAIT(wait);
> -	struct request_list *rl = &q->rq[rw];
>  	struct request *rq;
>  
> -	spin_lock_prefetch(q->queue_lock);
> -
>  	generic_unplug_device(q);
>  	do {
> -		int block = 0;
> +		rq = get_request(q, rw, GFP_NOIO);
>  
> -		prepare_to_wait_exclusive(&rl->wait, &wait,
> -					TASK_UNINTERRUPTIBLE);
> -		spin_lock_irq(q->queue_lock);
> -		if (!rl->count)
> -			block = 1;
> -		spin_unlock_irq(q->queue_lock);
> -
> -		if (block)
> +		if (!rq)
>  			io_schedule();

hmm.  I fear that if a SCHED_FIFO/SCHED_RR task hits this, it will just pick
itself to run again in the schedule() and the box locks up.

A blk_congestion_wait(WRITE, HZ/50) may be better here.  It will send the
caller to sleep until someone puts a write request back, which seems
appropriate.



  reply	other threads:[~2003-04-01 10:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-01 10:23 Jens Axboe
2003-04-01 10:45 ` Andrew Morton [this message]
2003-04-01 10:47   ` 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=20030401024548.715ff3c3.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=axboe@suse.de \
    --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

all inboxes | Powered by JetHome®