Skip to content
Commit dfb5c1e1 authored by Wei Liu's avatar Wei Liu
Browse files

x86/hyperv: remove on-stack cpumask from hv_send_ipi_mask_allbutself



It is not a good practice to allocate a cpumask on stack, given it may
consume up to 1 kilobytes of stack space if the kernel is configured to
have 8192 cpus.

The internal helper functions __send_ipi_mask{,_ex} need to loop over
the provided mask anyway, so it is not too difficult to skip `self'
there. We can thus do away with the on-stack cpumask in
hv_send_ipi_mask_allbutself.

Adjust call sites of __send_ipi_mask as needed.

Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Suggested-by: default avatarMichael Kelley <mikelley@microsoft.com>
Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Fixes: 68bb7bfb ("X86/Hyper-V: Enable IPI enlightenments")
Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20210910185714.299411-3-wei.liu@kernel.org
parent 7ad9bb9d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment