]> git.baikalelectronics.ru Git - kernel.git/commit
mm/page_alloc.c: do not acquire zone lock in is_free_buddy_page()
authorEric Dumazet <edumazet@google.com>
Fri, 5 Nov 2021 20:40:31 +0000 (13:40 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:38 +0000 (13:30 -0700)
commit94149243b11c015a1a0c5f86a96e70d8e664ee00
treedb42faccf526b0e0476d2651643d022b3cba6976
parent718c1b5ad29de35f37d5e039a0c346fc1d5608aa
mm/page_alloc.c: do not acquire zone lock in is_free_buddy_page()

Grabbing zone lock in is_free_buddy_page() gives a wrong sense of
safety, and has potential performance implications when zone is
experiencing lock contention.

In any case, if a caller needs a stable result, it should grab zone lock
before calling this function.

Link: https://lkml.kernel.org/r/20210922152833.4023972-1-eric.dumazet@gmail.com
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c