exynos-linux-stable/drivers/xen
Michal Hocko 0222bac3b4
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>
2023-02-21 00:20:54 +03:00
..
events xen: fix GCC warning and remove duplicate EVTCHN_ROW/EVTCHN_COL usage 2018-10-10 08:53:22 +02:00
xen-pciback xen/pciback: Check dev_data before using it 2019-12-05 15:34:29 +01:00
xenbus fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock 2019-06-11 12:22:49 +02:00
xenfs
acpi.c
arm-device.c
balloon.c xen/balloon: fix ballooned page accounting without hotplug enabled 2020-01-12 11:24:11 +01:00
biomerge.c
cpu_hotplug.c xen, cpu_hotplug: Prevent an out of bounds access 2020-01-29 10:24:18 +01:00
dbgp.c
efi.c
evtchn.c treewide: use kv[mz]alloc* rather than opencoded variants 2023-02-21 00:20:54 +03:00
fallback.c
features.c
gntalloc.c
gntdev.c
grant-table.c
Kconfig
Makefile Kbuild: use -fshort-wchar globally 2018-11-23 08:20:37 +01:00
manage.c xen/manage: don't complain about an empty value in control/sysrq node 2018-10-10 08:53:22 +02:00
mcelog.c
pci.c xen/pci: reserve MCFG areas earlier 2019-10-17 13:42:10 -07:00
pcpu.c
platform-pci.c
preempt.c xen: Enable interrupts when calling _cond_resched() 2020-02-28 15:42:57 +01:00
privcmd.c
privcmd.h
swiotlb-xen.c xen/swiotlb: fix condition for calling xen_destroy_contiguous_region() 2019-08-06 18:29:41 +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: off by one in read_acpi_id() 2018-05-30 07:50:42 +02:00
xen-balloon.c
xen-scsiback.c xen/scsiback: add error handling for xenbus_printf 2018-08-24 13:12:29 +02:00
xen-selfballoon.c
xen-stub.c
xlate_mmu.c xen: xlate_mmu: add missing header to fix 'W=1' warning 2018-12-17 09:38:34 +01:00