diff options
| author | Alexei Starovoitov <[email protected]> | 2025-03-31 00:28:09 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-04-12 00:32:36 +0000 |
| commit | c5bb27e2da3a6e1006f3e0aeb36d57c1dd1144aa (patch) | |
| tree | af7e7c3c013ab4d128954fcdd9512b465ff76ffa /drivers/fpga/tests/fpga-mgr-test.c | |
| parent | mm/compaction: fix bug in hugetlb handling pathway (diff) | |
| download | kernel-c5bb27e2da3a6e1006f3e0aeb36d57c1dd1144aa.tar.gz kernel-c5bb27e2da3a6e1006f3e0aeb36d57c1dd1144aa.zip | |
mm/page_alloc: avoid second trylock of zone->lock
spin_trylock followed by spin_lock will cause extra write cache access.
If the lock is contended it may cause unnecessary cache line bouncing and
will execute redundant irq restore/save pair. Therefore, check
alloc/fpi_flags first and use spin_trylock or spin_lock.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 97769a53f117 ("mm, bpf: Introduce try_alloc_pages() for opportunistic page allocation")
Signed-off-by: Alexei Starovoitov <[email protected]>
Suggested-by: Linus Torvalds <[email protected]>
Reviewed-by: Sebastian Andrzej Siewior <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Reviewed-by: Harry Yoo <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Cc: Daniel Borkman <[email protected]>
Cc: Martin KaFai Lau <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/fpga/tests/fpga-mgr-test.c')
0 files changed, 0 insertions, 0 deletions
