Find a file
Michal Hocko 9376130c39 mm/vmalloc: add support for __GFP_NOFAIL
Dave Chinner has mentioned that some of the xfs code would benefit from
kvmalloc support for __GFP_NOFAIL because they have allocations that
cannot fail and they do not fit into a single page.

The large part of the vmalloc implementation already complies with the
given gfp flags so there is no work for those to be done.  The area and
page table allocations are an exception to that.  Implement a retry loop
for those.

Add a short sleep before retrying.  1 jiffy is a completely random
timeout.  Ideally the retry would wait for an explicit event - e.g.  a
change to the vmalloc space change if the failure was caused by the
space fragmentation or depletion.  But there are multiple different
reasons to retry and this could become much more complex.  Keep the
retry simple for now and just sleep to prevent from hogging CPUs.

Link: https://lkml.kernel.org/r/20211122153233.9924-3-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-01-15 16:30:28 +02:00
arch x86: mm: add x86_64 support for page table check 2022-01-15 16:30:28 +02:00
block block-5.16-2021-12-19 2021-12-19 12:38:53 -08:00
certs
crypto Update to zstd-1.4.10 2021-11-13 15:32:30 -08:00
Documentation mm: page table check 2022-01-15 16:30:28 +02:00
drivers device-dax: compound devmap support 2022-01-15 16:30:26 +02:00
fs mm: move anon_vma declarations to linux/mm_inline.h 2022-01-15 16:30:27 +02:00
include mm: remove the total_mapcount argument from page_trans_huge_mapcount() 2022-01-15 16:30:28 +02:00
init kbuild: Fix -Wimplicit-fallthrough=5 error for GCC 5.x and 6.x 2021-11-14 18:59:49 -08:00
ipc shm: extend forced shm destroy to support objects from several IPC nses 2021-11-20 10:35:54 -08:00
kernel mm: move anon_vma declarations to linux/mm_inline.h 2022-01-15 16:30:27 +02:00
lib kasan: test: add test case for double-kmem_cache_destroy() 2022-01-15 16:30:26 +02:00
LICENSES
mm mm/vmalloc: add support for __GFP_NOFAIL 2022-01-15 16:30:28 +02:00
net Two more changes: 2022-01-04 07:18:28 -08:00
samples ftrace/samples: Add missing prototypes direct functions 2022-01-05 18:34:50 -05:00
scripts scripts/spelling.txt: add "oveflow" 2022-01-15 16:30:24 +02:00
security selinux/stable-5.16 PR 20211228 2021-12-28 13:33:06 -08:00
sound sound fixes for 5.16-rc7 2021-12-23 09:55:58 -08:00
tools tools/testing/selftests/vm/userfaultfd.c: use swap() to make code cleaner 2022-01-15 16:30:27 +02:00
usr
virt KVM: downgrade two BUG_ONs to WARN_ON_ONCE 2021-11-26 06:43:28 -05:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap mailmap: update email address for Guo Ren 2021-12-10 17:10:55 -08:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS mm: page table check 2022-01-15 16:30:28 +02:00
Makefile Linux 5.16 2022-01-09 14:55:34 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.