diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2024-02-28 12:30:09 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-03-05 13:38:14 +0300 |
commit | 4bc0d63a23957262b01b5848bd5e1739e98bbf36 (patch) | |
tree | 338d70eb8386b8f128f26b6d01f12dec1f7dc2a7 /drivers/nvme | |
parent | 411c5f36805c02c7c412f1ad6bfa4459a1148011 (diff) | |
download | linux-4bc0d63a23957262b01b5848bd5e1739e98bbf36.tar.xz |
page_frag: unify gfp bits for order 3 page allocation
Currently there seems to be three page frag implementations
which all try to allocate order 3 page, if that fails, it
then fail back to allocate order 0 page, and each of them
all allow order 3 page allocation to fail under certain
condition by using specific gfp bits.
The gfp bits for order 3 page allocation are different
between different implementation, __GFP_NOMEMALLOC is
or'd to forbid access to emergency reserves memory for
__page_frag_cache_refill(), but it is not or'd in other
implementions, __GFP_DIRECT_RECLAIM is masked off to avoid
direct reclaim in vhost_net_page_frag_refill(), but it is
not masked off in __page_frag_cache_refill().
This patch unifies the gfp bits used between different
implementions by or'ing __GFP_NOMEMALLOC and masking off
__GFP_DIRECT_RECLAIM for order 3 page allocation to avoid
possible pressure for mm.
Leave the gfp unifying for page frag implementation in sock.c
for now as suggested by Paolo Abeni.
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
CC: Alexander Duyck <alexander.duyck@gmail.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/nvme')
0 files changed, 0 insertions, 0 deletions