lkml.org 
[lkml]   [2016]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity mask
    On Sun, Jul 10, 2016 at 05:41:44AM +0200, Christoph Hellwig wrote:
    > 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.

    To be honest, I fail to see a functional difference, but it is just
    a nit anyway.

    \
     
     \ /
      Last update: 2016-07-12 09:01    [W:3.103 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site