lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 17 Feb 2019 21:39:00 +0800
From:   Ming Lei <ming.lei@...hat.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Christoph Hellwig <hch@....de>,
        Bjorn Helgaas <helgaas@...nel.org>,
        Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
        Sagi Grimberg <sagi@...mberg.me>,
        linux-nvme@...ts.infradead.org, linux-pci@...r.kernel.org,
        Keith Busch <keith.busch@...el.com>,
        Marc Zyngier <marc.zyngier@....com>,
        Sumit Saxena <sumit.saxena@...adcom.com>,
        Kashyap Desai <kashyap.desai@...adcom.com>,
        Shivasharan Srikanteshwara 
        <shivasharan.srikanteshwara@...adcom.com>
Subject: Re: [patch v6 5/7] genirq/affinity: Remove the leftovers of the
 original set support

On Sat, Feb 16, 2019 at 06:13:11PM +0100, Thomas Gleixner wrote:
> Now that the NVME driver is converted over to the calc_set() callback, the
> workarounds of the original set support can be removed.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>  kernel/irq/affinity.c |   20 ++++----------------
>  1 file changed, 4 insertions(+), 16 deletions(-)
> 
> Index: b/kernel/irq/affinity.c
> ===================================================================
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -264,20 +264,13 @@ irq_create_affinity_masks(unsigned int n
>  
>  	/*
>  	 * Simple invocations do not provide a calc_sets() callback. Install
> -	 * the generic one. The check for affd->nr_sets is a temporary
> -	 * workaround and will be removed after the NVME driver is converted
> -	 * over.
> +	 * the generic one.
>  	 */
> -	if (!affd->nr_sets && !affd->calc_sets)
> +	if (!affd->calc_sets)
>  		affd->calc_sets = default_calc_sets;
>  
> -	/*
> -	 * If the device driver provided a calc_sets() callback let it
> -	 * recalculate the number of sets and their size. The check will go
> -	 * away once the NVME driver is converted over.
> -	 */
> -	if (affd->calc_sets)
> -		affd->calc_sets(affd, affvecs);
> +	/* Recalculate the sets */
> +	affd->calc_sets(affd, affvecs);
>  
>  	if (WARN_ON_ONCE(affd->nr_sets > IRQ_AFFINITY_MAX_SETS))
>  		return NULL;
> @@ -344,11 +337,6 @@ unsigned int irq_calc_affinity_vectors(u
>  
>  	if (affd->calc_sets) {
>  		set_vecs = maxvec - resv;
> -	} else if (affd->nr_sets) {
> -		unsigned int i;
> -
> -		for (i = 0, set_vecs = 0;  i < affd->nr_sets; i++)
> -			set_vecs += affd->set_size[i];
>  	} else {
>  		get_online_cpus();
>  		set_vecs = cpumask_weight(cpu_possible_mask);
> 
> 

Reviewed-by: Ming Lei <ming.lei@...hat.com>

Thanks,
Ming

Powered by blists - more mailing lists