diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2022-05-19 14:08:51 -0700 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-05-19 14:08:51 -0700 |
commit | eacde32757c7566d3aa760609585c78909532e40 (patch) | |
tree | 84fb3ff8102a79708bec92a25553626dc222f65f /mm/debug.c | |
parent | 3db3264d8a5f4816c022eb9052694ce51e657bfc (diff) | |
download | linux-eacde32757c7566d3aa760609585c78909532e40.tar.gz |
mm/swap: avoid calling swp_swap_info when try to check SWP_STABLE_WRITES
Use flags of si directly to check SWP_STABLE_WRITES to avoid possible
READ_ONCE and thus save some cpu cycles.
[akpm@linux-foundation.org: use data_race() on si->flags, per Neil]
Link: https://lkml.kernel.org/r/20220509131416.17553-10-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Peter Xu <peterx@redhat.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/debug.c')
0 files changed, 0 insertions, 0 deletions