2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 12:14:01 +08:00
linux-next/drivers/staging
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
..
android Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
board
ccree staging: ccree: fix ifnullfree.cocci warnings 2017-04-28 12:17:54 +02:00
clocking-wizard
comedi staging: comedi: addi_apci_3xxx: check return value 2017-04-25 20:43:42 +02:00
dgnc staging: dgnc: remove error message task 2017-03-29 09:37:10 +02:00
emxx_udc staging: emxx_udc: Add comment for spinlock_t definition. 2017-03-09 14:13:51 +01:00
fbtft staging: fbtft: fix open parentheses alignment 2017-04-28 12:07:25 +02:00
fsl-dpaa2 staging: fsl-dpaa2/eth: Add TODO file 2017-04-28 14:25:17 +02:00
fsl-mc staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd 2017-04-28 17:51:54 +02:00
fwserial
gdm724x staging: gdm724x: gdm_mux: fix use-after-free on module unload 2017-04-28 12:32:49 +02:00
goldfish Staging: goldfish: use __func__ instead of embedded function names 2017-03-17 15:19:09 +09:00
greybus staging: greybus: uart.c: Remove include linux/serial.h 2017-04-18 13:27:16 +02:00
gs_fpgaboot scripts/spelling.txt: add "followings" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
iio Staging: iio: accel: adis16203: fixed a brace coding style issue 2017-04-14 16:13:34 +01:00
ks7010 staging: ks7010: remove line continuations in quoted strings 2017-04-28 17:51:39 +02:00
lustre treewide: use kv[mz]alloc* rather than opencoded variants 2017-05-08 17:15:13 -07:00
media Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
most Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
mt29f_spinand
netlogic net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
nvec Staging: nvec: Remove FSF's mailing address 2017-04-08 12:55:25 +02:00
octeon staging: octeon: remove unused variable 2017-03-08 09:45:07 +01:00
octeon-usb
olpc_dcon staging: olpc_dcon: style fixes 2017-04-28 12:07:24 +02:00
rtl8188eu staging: rtl8188eu: embedded function name style fixes 2017-04-28 12:30:21 +02:00
rtl8192e staging: rtl8192e: Fix embedded function names with __func__ 2017-03-29 09:39:08 +02:00
rtl8192u staging: rtl8192u: fix spelling mistake in variable name *attentuation 2017-04-28 12:27:50 +02:00
rtl8712 staging: rtl8712: fixed multiple line derefence issue 2017-04-08 17:05:59 +02:00
rtl8723bs Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
rts5208 staging: rts5208: ms.c fixed checkpatch warning - using __func__ instead of hardcoded name 2017-04-08 17:05:59 +02:00
skein staging: skein: fix checkpatch block comments warning 2017-01-20 14:39:12 +01:00
sm750fb staging: sm750fb: removed line continuations in quoted strings 2017-04-08 17:00:52 +02:00
speakup staging: speakup: add send_xchar and tiocmset methods 2017-04-25 20:45:12 +02:00
typec staging: typec: Fairchild FUSB302 Type-c chip driver 2017-04-28 11:29:00 +02:00
unisys staging: unisys: visorhba: fix s-Par to boot with option CONFIG_VMAP_STACK set to y 2017-04-28 11:55:53 +02:00
vc04_services staging: media/platform/bcm2835: remove gstreamer workaround 2017-04-18 13:54:24 +02:00
vme drivers: convert vme_user_vma_priv.refcnt from atomic_t to refcount_t 2017-03-14 06:23:12 +08:00
vt6655 Staging: vt6655 - block comments style fix 2017-03-29 09:39:08 +02:00
vt6656 staging: vt6656: use tabs instead of spaces 2017-04-28 14:30:43 +02:00
wilc1000 Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
wlan-ng Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
xgifb staging: xgifb: added blankline after decl. 2017-04-08 17:05:59 +02:00
Kconfig Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
Makefile Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00