linux/drivers/xen
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
..
events xen: Revert commits da72ff5bfc and 72a9b18629 2017-05-02 11:18:05 +02:00
xen-pciback xen: modify xenstore watch event interface 2017-02-09 11:26:49 -05:00
xenbus xenbus: remove transaction holder from list before freeing 2017-04-04 10:11:06 -04:00
xenfs xen: clean up xenbus internal headers 2017-02-09 11:26:49 -05:00
Kconfig
Makefile
acpi.c
arm-device.c Xen: ARM: Zero reserved fields of xatp before making hypervisor call 2017-01-03 10:06:13 -08:00
balloon.c xen/balloon: decorate PV-only parts with #ifdef CONFIG_XEN_PV 2017-05-02 11:09:56 +02:00
biomerge.c
cpu_hotplug.c xen: modify xenstore watch event interface 2017-02-09 11:26:49 -05:00
dbgp.c
efi.c xen: Implement EFI reset_system callback 2017-05-02 12:06:50 +02:00
evtchn.c treewide: use kv[mz]alloc* rather than opencoded variants 2017-05-08 17:15:13 -07:00
fallback.c
features.c
gntalloc.c xen: set error code on failures 2016-12-08 07:53:50 +01:00
gntdev.c drivers, xen: convert grant_map.users from atomic_t to refcount_t 2017-03-13 12:45:18 -04:00
grant-table.c xen/pvh: Initialize grant table for PVH guests 2017-02-07 08:07:01 -05:00
manage.c xen: modify xenstore watch event interface 2017-02-09 11:26:49 -05:00
mcelog.c
pci.c
pcpu.c
platform-pci.c xen: Revert commits da72ff5bfc and 72a9b18629 2017-05-02 11:18:05 +02:00
preempt.c
privcmd.c mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf 2017-02-24 17:46:54 -08:00
privcmd.h
swiotlb-xen.c xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops 2017-05-02 11:14:47 +02:00
sys-hypervisor.c
time.c
tmem.c
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c xen/acpi: upload PM state from init-domain to Xen 2017-03-23 12:00:02 -04:00
xen-balloon.c xen: modify xenstore watch event interface 2017-02-09 11:26:49 -05:00
xen-scsiback.c
xen-selfballoon.c
xen-stub.c
xlate_mmu.c