Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440025

Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity mask

From Christoph Hellwig <hch@lst.de>
Newsgroups linux.kernel
Subject Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity mask
Date 2016-07-10 05:50 +0200
Message-ID <rTdUJ-3GE-1@gated-at.bofh.it> (permalink)
References <rK2Fb-Rz-3@gated-at.bofh.it> <rK2Fc-Rz-11@gated-at.bofh.it> <rR7gJ-3eC-3@gated-at.bofh.it> <rR7A5-3l0-7@gated-at.bofh.it> <rR8wa-3U6-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jul 04, 2016 at 11:35:28AM +0200, Alexander Gordeev wrote:
> > mq_map is initialized to zero already, so we don't really need the
> > assignment for queue 0.  The reason why this check exists is because
> > we start with queue = -1 and we never want to assignment -1 to mq_map.
> 
> Would this read better then?
> 
> 	int queue = 0;
> 
> 	...
> 
> 	/* If cpus are offline, map them to first hctx */
> 	for_each_online_cpu(cpu) {
> 		set->mq_map[cpu] = queue;
> 		if (cpumask_test_cpu(cpu, affinity_mask))
> 			queue++;

It would read better, but I don't think it's actually correct.
We'd still assign the 'old' queue to the cpu that is set in the affinity
mask.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity  mask Alexander Gordeev <agordeev@redhat.com> - 2016-07-04 10:20 +0200
  Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity  mask Christoph Hellwig <hch@lst.de> - 2016-07-04 10:40 +0200
    Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity  mask Alexander Gordeev <agordeev@redhat.com> - 2016-07-04 11:40 +0200
      Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity  mask Christoph Hellwig <hch@lst.de> - 2016-07-10 05:50 +0200
        Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity  mask Alexander Gordeev <agordeev@redhat.com> - 2016-07-12 08:40 +0200

csiph-web