All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Christoph Hellwig <hch@lst.de>, Robert Elliott <elliott@hp.com>,
	Ming Lei <ming.lei@canonical.com>,
	Alexander Gordeev <agordeev@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/6] blk-mq: Use all available hardware queues
Date: Tue, 09 Dec 2014 09:10:51 -0700	[thread overview]
Message-ID: <54871F0B.7080208@kernel.dk> (raw)
In-Reply-To: <54871C59.3050903@acm.org>

On 12/09/2014 08:59 AM, Bart Van Assche wrote:
> Suppose that a system has two CPU sockets, three cores per socket,
> that it does not support hyperthreading and that four hardware
> queues are provided by a block driver. With the current algorithm
> this will lead to the following assignment of CPU cores to hardware
> queues:
>
>    HWQ 0: 0 1
>    HWQ 1: 2 3
>    HWQ 2: 4 5
>    HWQ 3: (none)
>
> This patch changes the queue assignment into:
>
>    HWQ 0: 0 1
>    HWQ 1: 2
>    HWQ 2: 3 4
>    HWQ 3: 5
>
> In other words, this patch has the following three effects:
> - All four hardware queues are used instead of only three.
> - CPU cores are spread more evenly over hardware queues. For the
>    above example the range of the number of CPU cores associated
>    with a single HWQ is reduced from [0..2] to [1..2].
> - If the number of HWQ's is a multiple of the number of CPU sockets
>    it is now guaranteed that all CPU cores associated with a single
>    HWQ reside on the same CPU socket.

I have thought about this since your last posting, and I think it should 
be a win for most cases to do this, even if we end up with asymmetric 
queue <-> cpu mappings.

-- 
Jens Axboe


  reply	other threads:[~2014-12-09 16:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09 15:57 [PATCH 0/6] Six blk-mq patches Bart Van Assche
2014-12-09 15:57 ` [PATCH 1/6] blk-mq: Fix a use-after-free Bart Van Assche
2014-12-09 15:58 ` [PATCH 2/6] blk-mq: Avoid that __bt_get_word() wraps multiple times Bart Van Assche
2014-12-09 15:58 ` [PATCH 3/6] blk-mq: Fix a race between bt_clear_tag() and bt_get() Bart Van Assche
2014-12-09 15:58 ` [PATCH 4/6] blk-mq: Avoid that I/O hangs in bt_get() Bart Van Assche
2014-12-09 16:10   ` Jens Axboe
2014-12-09 15:59 ` [PATCH 5/6] blk-mq: Use all available hardware queues Bart Van Assche
2014-12-09 16:10   ` Jens Axboe [this message]
2014-12-09 15:59 ` [PATCH 6/6] blk-mq: Micro-optimize bt_get() Bart Van Assche
2014-12-09 16:06   ` 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=54871F0B.7080208@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=agordeev@redhat.com \
    --cc=bvanassche@acm.org \
    --cc=elliott@hp.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@canonical.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.