public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Lukáš Czerner" <lczerner@redhat.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: Lukas Czerner <lczerner@redhat.com>,
	axboe@kernel.dk, dchinner@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] loop: Limit the number of requests in the bio list
Date: Tue, 13 Nov 2012 09:44:46 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.1211130944161.3577@localhost> (raw)
In-Reply-To: <x49k3tvrcci.fsf@segfault.boston.devel.redhat.com>

On Thu, 8 Nov 2012, Jeff Moyer wrote:

> Date: Thu, 08 Nov 2012 16:53:01 -0500
> From: Jeff Moyer <jmoyer@redhat.com>
> To: Lukas Czerner <lczerner@redhat.com>
> Cc: axboe@kernel.dk, dchinner@redhat.com, linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v2] loop: Limit the number of requests in the bio list
> 
> Lukas Czerner <lczerner@redhat.com> writes:
> 
> > +	if (lo->lo_bio_count >= lo->lo_queue->nr_requests) {
> > +		unsigned int nr;
> > +		spin_unlock_irq(&lo->lo_lock);
> > +		nr = lo->lo_queue->nr_requests - (lo->lo_queue->nr_requests/8);
> > +		wait_event_interruptible(lo->lo_req_wait,
> > +					 lo->lo_bio_count < nr);
> > +		spin_lock_irq(&lo->lo_lock);
> > +	}
> 
> So, blk_queue_make_request already initialized q->nr_congestion_on and
> q->nr_congestion_off.  Is there a reason you didn't simply use
> queue_congestion_on_threshold and queue_congestion_off_threshold?

The reason is that I did not knew about those :) Thanks for pointing
it out I'll take a look at it.

Thanks!
-Lukas

> 
> Cheers,
> Jeff
> 

      reply	other threads:[~2012-11-13  8:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-16  9:21 [PATCH v2] loop: Limit the number of requests in the bio list Lukas Czerner
2012-11-08 19:14 ` Andrew Morton
2012-11-08 21:32   ` Jeff Moyer
2012-11-09  7:34   ` Jens Axboe
2012-11-13  8:43     ` Lukáš Czerner
2012-11-13  8:49   ` Lukáš Czerner
2012-11-08 21:53 ` Jeff Moyer
2012-11-13  8:44   ` Lukáš Czerner [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=alpine.LFD.2.00.1211130944161.3577@localhost \
    --to=lczerner@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dchinner@redhat.com \
    --cc=jmoyer@redhat.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