Re: [PATCH net 1/1] hv_netvsc: Calculate correct ring size when PAGE_SIZE is not 4 Kbytes

2024-01-22 Thread Simon Horman
On Mon, Jan 22, 2024 at 08:20:28AM -0800, mhkelle...@gmail.com wrote: > From: Michael Kelley > > Current code in netvsc_drv_init() incorrectly assumes that PAGE_SIZE > is 4 Kbytes, which is wrong on ARM64 with 16K or 64K page size. As a > result, the default VMBus ring buffer size on ARM64 with 6

[PATCH 1/1] scsi: storvsc: Fix ring buffer size calculation

2024-01-22 Thread mhkelley58
From: Michael Kelley Current code uses the specified ring buffer size (either the default of 128 Kbytes or a module parameter specified value) to encompass the one page ring buffer header plus the actual ring itself. When the page size is 4K, carving off one page for the header isn't significant

[PATCH net 1/1] hv_netvsc: Calculate correct ring size when PAGE_SIZE is not 4 Kbytes

2024-01-22 Thread mhkelley58
From: Michael Kelley Current code in netvsc_drv_init() incorrectly assumes that PAGE_SIZE is 4 Kbytes, which is wrong on ARM64 with 16K or 64K page size. As a result, the default VMBus ring buffer size on ARM64 with 64K page size is 8 Mbytes instead of the expected 512 Kbytes. While this doesn't

[PATCH 4/4 V2 net-next] net: mana: Assigning IRQ affinity on HT cores

2024-01-22 Thread Souradeep Chakrabarti
Existing MANA design assigns IRQ to every CPU, including sibling hyper-threads. This may cause multiple IRQs to be active simultaneously in the same core and may reduce the network performance. Improve the performance by assigning IRQ to non sibling CPUs in local NUMA node. The performance improve

[PATCH 3/4 V2 net-next] net: mana: add a function to spread IRQs per CPUs

2024-01-22 Thread Souradeep Chakrabarti
From: Yury Norov Souradeep investigated that the driver performs faster if IRQs are spread on CPUs with the following heuristics: 1. No more than one IRQ per CPU, if possible; 2. NUMA locality is the second priority; 3. Sibling dislocality is the last priority. Let's consider this topology: No

[PATCH 2/4 V2 net-next] cpumask: define cleanup function for cpumasks

2024-01-22 Thread Souradeep Chakrabarti
From: Yury Norov Now we can simplify code that allocates cpumasks for local needs. Signed-off-by: Yury Norov --- include/linux/cpumask.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 228c23eb36d2..1c29947db848 100644 --- a/includ

[PATCH 1/4 V2 net-next] cpumask: add cpumask_weight_andnot()

2024-01-22 Thread Souradeep Chakrabarti
From: Yury Norov Similarly to cpumask_weight_and(), cpumask_weight_andnot() is a handy helper that may help to avoid creating an intermediate mask just to calculate number of bits that set in a 1st given mask, and clear in 2nd one. Signed-off-by: Yury Norov Reviewed-by: Jacob Keller --- inclu

[PATCH 0/4 V2 net-next] net: mana: Assigning IRQ affinity on HT cores

2024-01-22 Thread Souradeep Chakrabarti
This patch set introduces a new helper function irq_setup(), to optimize IRQ distribution for MANA network devices. The patch set makes the driver working 15% faster than with cpumask_local_spread(). Souradeep Chakrabarti (1): net: mana: Assigning IRQ affinity on HT cores Yury Norov (3): cpum

[PATCH 1/1] x86/hyperv: Use Hyper-V entropy to seed guest random number generator

2024-01-22 Thread mhkelley58
From: Michael Kelley A Hyper-V host provides its guest VMs with entropy in a custom ACPI table named "OEM0". The entropy bits are updated each time Hyper-V boots the VM, and are suitable for seeding the Linux guest random number generator (rng). See a brief description of OEM0 in [1]. Generati