public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Tao Ma <tm@tao.ma>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: Remove the extra check in queue_requests_store.
Date: Tue, 19 Apr 2011 13:51:23 +0200	[thread overview]
Message-ID: <4DAD773B.3060602@kernel.dk> (raw)
In-Reply-To: <1303201617-18122-1-git-send-email-tm@tao.ma>

On 2011-04-19 10:26, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
> 
> In queue_requests_store, the code looks like
> 	if (rl->count[BLK_RW_SYNC] >= q->nr_requests) {
> 		blk_set_queue_full(q, BLK_RW_SYNC);
> 	} else if (rl->count[BLK_RW_SYNC]+1 <= q->nr_requests) {
> 		blk_clear_queue_full(q, BLK_RW_SYNC);
> 		wake_up(&rl->wait[BLK_RW_SYNC]);
> 	}
> If we don't satify the situation of "if", we can get that
> rl->count[BLK_RW_SYNC} < q->nr_quests. It is the same as
> rl->count[BLK_RW_SYNC]+1 <= q->nr_requests.
> All the "else" should satisfy the "else if" check so it isn't
> needed actually.

Thanks, applied.

-- 
Jens Axboe


      reply	other threads:[~2011-04-19 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19  8:26 [PATCH] block: Remove the extra check in queue_requests_store Tao Ma
2011-04-19 11:51 ` Jens Axboe [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=4DAD773B.3060602@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tm@tao.ma \
    /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