Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: jonathan.derrick@intel.com (Derrick, Jonathan)
Subject: [PATCH V3 1/3] genirq/affinity: Enhance warning check
Date: Tue, 13 Aug 2019 19:31:39 +0000	[thread overview]
Message-ID: <ac920ba3996d0feedc924045b54724ba5482e427.camel@intel.com> (raw)
In-Reply-To: <20190813081447.1396-2-ming.lei@redhat.com>

Hi Ming,

On Tue, 2019-08-13@16:14 +0800, Ming Lei wrote:
> The two-stage spread is done on same irq vectors, and we just need that
> either one stage covers all vector, not two stage work together to cover
> all vectors.
> 
> So enhance the warning check to make sure all vectors are spread.
> 
> Cc: Christoph Hellwig <hch at lst.de>
> Cc: Keith Busch <kbusch at kernel.org>
> Cc: linux-nvme at lists.infradead.org,
> Cc: Jon Derrick <jonathan.derrick at intel.com>
> Cc: Jens Axboe <axboe at kernel.dk>
> Fixes: 6da4b3ab9a6 ("genirq/affinity: Add support for allocating interrupt sets")
> Signed-off-by: Ming Lei <ming.lei at redhat.com>
> ---
>  kernel/irq/affinity.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index 6fef48033f96..265b3076f16b 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -215,8 +215,7 @@ static int irq_build_affinity_masks(unsigned int startvec, unsigned int numvecs,
>  					       npresmsk, nmsk, masks);
>  	put_online_cpus();
>  
> -	if (nr_present < numvecs)
> -		WARN_ON(nr_present + nr_others < numvecs);
> +	WARN_ON(max(nr_present, nr_others) < numvecs);

I think the patch description assumes the first condition
"The two-stage spread is done on same irq vectors"

    /*
     * Spread on non present CPUs starting from the next vector to be
     * handled. If the spreading of present CPUs already exhausted the
     * vector space, assign the non present CPUs to the already spread
     * out vectors.
     */
    if (nr_present >= numvecs)
            curvec = firstvec;

But doesn't following condition imply nr_others spread is potentionally
different vector set?

    else
            curvec = firstvec + nr_present;

>  
>  	free_node_to_cpumask(node_to_cpumask);
>  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3278 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20190813/cd319cc3/attachment.bin>

  reply	other threads:[~2019-08-13 19:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13  8:14 [PATCH V3 0/3] genriq/affinity: Make vectors allocation fair Ming Lei
2019-08-13  8:14 ` [PATCH V3 1/3] genirq/affinity: Enhance warning check Ming Lei
2019-08-13 19:31   ` Derrick, Jonathan [this message]
2019-08-14  8:58     ` Ming Lei
2019-08-13  8:14 ` [PATCH V3 2/3] genirq/affinity: Improve __irq_build_affinity_masks() Ming Lei
2019-08-13  8:14 ` [PATCH V3 3/3] genirq/affinity: Spread vectors on node according to nr_cpu ratio Ming Lei
2019-08-13  9:34   ` Daniel Wagner

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=ac920ba3996d0feedc924045b54724ba5482e427.camel@intel.com \
    --to=jonathan.derrick@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox