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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 2 Nov 2015 13:25:43 +0200
From:	Saeed Mahameed <saeedm@....mellanox.co.il>
To:	"David S. Miller" <davem@...emloft.net>,
	Achiad Shochat <achiad@...lanox.com>,
	Or Gerlitz <ogerlitz@...lanox.com>
Cc:	netdev@...r.kernel.org, Saeed Mahameed <saeedm@...lanox.com>
Subject: Re: [PATCH net-next 4/8] net/mlx5e: Consider IRQ affinity changes in
 NAPI poll

Hi Dave,

We agree with you, we will drop this patch for now and will think of a
cleaner approach to fix this in the future.

> From: David Miller [mailto:davem@...emloft.net]
> Sent: Monday, November 02, 2015 12:34 AM
> To: Or Gerlitz <ogerlitz@...lanox.com>
> Cc: netdev@...r.kernel.org; Saeed Mahameed <saeedm@...lanox.com>; Achiad Shochat <achiad@...lanox.com>
> Subject: Re: [PATCH net-next 4/8] net/mlx5e: Consider IRQ affinity changes in NAPI poll
>
> From: Or Gerlitz <ogerlitz@...lanox.com>
> Date: Sun,  1 Nov 2015 19:35:18 +0200
>
>> @@ -49,6 +50,15 @@ struct mlx5_cqe64 *mlx5e_get_cqe(struct mlx5e_cq *cq)
>>       return cqe;
>>  }
>>
>> +static inline bool mlx5e_no_channel_affinity_change(struct
>> +mlx5e_channel *c) {
>> +     int current_cpu = smp_processor_id();
>> +     struct irq_data *d = irq_desc_get_irq_data(c->irq_desc);
>> +     struct cpumask *aff = irq_data_get_affinity_mask(d);
>> +
>> +     return cpumask_test_cpu(current_cpu, aff); }
>
> This is so much pointer dereferencing and then a bitmask test as well.
>
> Are you really sure sure an extremely rare situation warrants this test every single NAPI poll call?
>
> If this is a real problem, then every driver is susceptible to the issue and it therefore warrants a generic solution.  And if we have generic infrastructure for this situation in the code NAPI polling networking code, I guarantee that it will probably be implemented much more cheaply than this.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ