1
0
Fork 0
remarkable-linux/include
Michal Hocko 752ade68cb treewide: use kv[mz]alloc* rather than opencoded variants
There are many code paths opencoding kvmalloc.  Let's use the helper
instead.  The main difference to kvmalloc is that those users are
usually not considering all the aspects of the memory allocator.  E.g.
allocation requests <= 32kB (with 4kB pages) are basically never failing
and invoke OOM killer to satisfy the allocation.  This sounds too
disruptive for something that has a reasonable fallback - the vmalloc.
On the other hand those requests might fallback to vmalloc even when the
memory allocator would succeed after several more reclaim/compaction
attempts previously.  There is no guarantee something like that happens
though.

This patch converts many of those places to kv[mz]alloc* helpers because
they are more conservative.

Link: http://lkml.kernel.org/r/20170306103327.2766-2-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> # Xen bits
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Andreas Dilger <andreas.dilger@intel.com> # Lustre
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> # KVM/s390
Acked-by: Dan Williams <dan.j.williams@intel.com> # nvdim
Acked-by: David Sterba <dsterba@suse.com> # btrfs
Acked-by: Ilya Dryomov <idryomov@gmail.com> # Ceph
Acked-by: Tariq Toukan <tariqt@mellanox.com> # mlx4
Acked-by: Leon Romanovsky <leonro@mellanox.com> # mlx5
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Santosh Raspatur <santosh@chelsio.com>
Cc: Hariprasad S <hariprasad@chelsio.com>
Cc: Yishai Hadas <yishaih@mellanox.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: "Yan, Zheng" <zyan@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-05-08 17:15:13 -07:00
..
acpi Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2017-05-03 08:50:52 -07:00
asm-generic Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 23:54:56 -07:00
clocksource clocksource: arm_arch_timer: add structs to describe MMIO timer 2017-04-19 16:11:48 +01:00
crypto Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2017-05-03 08:50:52 -07:00
drm Merge tag 'drm-misc-next-2017-04-07' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-04-11 07:41:10 +10:00
dt-bindings This is the bulk of GPIO changes for the v4.12 kernel cycle: 2017-05-04 12:05:32 -07:00
keys KEYS: Split role of the keyring pointer for keyring restrict functions 2017-04-03 10:24:56 -07:00
kvm KVM: arm64: Ensure LRs are clear when they should be 2017-04-04 14:33:58 +02:00
linux treewide: use kv[mz]alloc* rather than opencoded variants 2017-05-08 17:15:13 -07:00
math-emu
media [media] cec.h: merge cec-edid.h into cec.h 2017-04-19 06:53:18 -03:00
memory
misc auxdisplay: charlcd: Add support for 4-bit interfaces 2017-03-17 15:10:49 +09:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-04 12:26:43 -07:00
pcmcia
ras
rdma Updates for 4.12 kernel merge window 2017-05-03 12:45:55 -07:00
rxrpc
scsi SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
soc soc/qman: add macros needed by caam/qi driver 2017-03-24 22:02:58 +08:00
sound ASoC: Updates for v4.12 2017-05-02 08:25:25 +02:00
target target: Fix ALUA transition state race between multiple initiators 2017-03-30 23:12:40 -07:00
trace media updates for v4.12-rc1 2017-05-05 17:34:57 -07:00
uapi Changes for 4.12: 2017-05-06 11:46:16 -07:00
video main drm pull request for 4.12 kernel 2017-05-03 11:44:24 -07:00
xen xen: Implement EFI reset_system callback 2017-05-02 12:06:50 +02:00
Kbuild