Re: [PATCH v3] x86/vmx: Rewrite vmx_sync_pir_to_irr() to be more efficient

2025-03-06 Thread Andrew Cooper
On 05/03/2025 11:36 am, Jan Beulich wrote: > On 05.03.2025 00:22, Andrew Cooper wrote: >> There are two issues. First, pi_test_and_clear_on() pulls the cache-line to >> the CPU and dirties it even if there's nothing outstanding, but the final >> bitmap_for_each() is O(256) when O(8) would do, and

Re: [PATCH v3] x86/vmx: Rewrite vmx_sync_pir_to_irr() to be more efficient

2025-03-05 Thread Jan Beulich
On 05.03.2025 00:22, Andrew Cooper wrote: > There are two issues. First, pi_test_and_clear_on() pulls the cache-line to > the CPU and dirties it even if there's nothing outstanding, but the final > bitmap_for_each() is O(256) when O(8) would do, and would avoid multiple > atomic updates to the sam

[PATCH v3] x86/vmx: Rewrite vmx_sync_pir_to_irr() to be more efficient

2025-03-04 Thread Andrew Cooper
There are two issues. First, pi_test_and_clear_on() pulls the cache-line to the CPU and dirties it even if there's nothing outstanding, but the final bitmap_for_each() is O(256) when O(8) would do, and would avoid multiple atomic updates to the same IRR word. Rewrite it from scratch, explaining w