1
0
Fork 0
remarkable-linux/drivers/net/ethernet/mellanox/mlx4
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
..
Kconfig ptp_clock: Allow for it to be optional 2016-11-16 09:26:34 +01:00
Makefile net/mlx4: New file for QoS related firmware commands 2015-04-02 16:25:02 -04:00
alloc.c net/mlx4: Avoid wrong virtual mappings 2016-05-05 23:23:05 -04:00
catas.c net/mlx4_core: Avoid command timeouts during VF driver device shutdown 2017-01-30 15:45:27 -05:00
cmd.c net/mlx4_core: Avoid delays during VF driver device shutdown 2017-03-16 20:14:51 -07:00
cq.c mlx4: do not fire tasklet unless necessary 2017-02-17 10:55:22 -05:00
en_clock.c net/mlx4_en: fix overflow in mlx4_en_init_timestamp() 2017-02-26 15:39:43 -05:00
en_cq.c net/mlx4_en: remove napi_hash_del() call 2016-11-17 11:17:05 -05:00
en_dcb_nl.c net/mlx4: Change ENOTSUPP to EOPNOTSUPP 2017-02-23 10:57:56 -05:00
en_ethtool.c mlx4: add rx_alloc_pages counter in ethtool -S 2017-03-09 09:54:46 -08:00
en_main.c net/mlx4_en: Refactor the XDP forwarding rings scheme 2016-11-02 15:07:11 -04:00
en_netdev.c mqprio: Modify mqprio to pass user parameters via ndo_setup_tc. 2017-03-15 15:20:27 -07:00
en_port.c mlx4: add rx_alloc_pages counter in ethtool -S 2017-03-09 09:54:46 -08:00
en_port.h net/mlx4_en: Check the enabling pptx/pprx flags in SET_PORT wrapper flow 2017-01-30 15:26:43 -05:00
en_resources.c net/mlx4: Avoid wrong virtual mappings 2016-05-05 23:23:05 -04:00
en_rx.c mlx4: remove duplicate code in mlx4_en_process_rx_cq() 2017-03-09 09:54:46 -08:00
en_selftest.c mlx4: make validate_loopback() more generic 2017-03-09 09:54:46 -08:00
en_tx.c treewide: use kv[mz]alloc* rather than opencoded variants 2017-05-08 17:15:13 -07:00
eq.c net/mlx4_core: Use cq quota in SRIOV when creating completion EQs 2017-02-23 10:57:57 -05:00
fw.c net/mlx4: Change ENOTSUPP to EOPNOTSUPP 2017-02-23 10:57:56 -05:00
fw.h mlx4: remove unused fields 2016-09-30 01:56:41 -04:00
fw_qos.c net/mlx4: Add mlx4_SET_VPORT_QOS implementation 2015-04-02 16:25:02 -04:00
fw_qos.h net/mlx4: Added qos_vport QP configuration in VST mode 2015-04-02 16:25:03 -04:00
icm.c net/mlx4: Remove BUG_ON from ICM allocation routine 2016-12-29 14:17:40 -05:00
icm.h mlx4_core: Fix GFP flags parameters to be gfp_t 2014-06-04 10:19:13 -07:00
intf.c net/mlx4: Change ENOTSUPP to EOPNOTSUPP 2017-02-23 10:57:56 -05:00
main.c net/mlx4_core: Avoid delays during VF driver device shutdown 2017-03-16 20:14:51 -07:00
mcg.c net/mlx4: Fix uninitialized fields in rule when adding promiscuous mode to device managed flow steering 2016-11-28 15:33:46 -05:00
mlx4.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-02 16:54:00 -05:00
mlx4_en.h mlx4: add rx_alloc_pages counter in ethtool -S 2017-03-09 09:54:46 -08:00
mlx4_stats.h mlx4: add rx_alloc_pages counter in ethtool -S 2017-03-09 09:54:46 -08:00
mr.c treewide: use kv[mz]alloc* rather than opencoded variants 2017-05-08 17:15:13 -07:00
pd.c io-mapping: Specify mapping size for io_mapping_map_wc() 2016-04-28 12:17:32 +01:00
port.c net/mlx4_en: fix a condition 2017-02-06 12:01:06 -05:00
profile.c net/mlx4_core: use swap() in mlx4_make_profile() 2015-06-11 15:19:41 -07:00
qp.c net/mlx4: Change ENOTSUPP to EOPNOTSUPP 2017-02-23 10:57:56 -05:00
reset.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
resource_tracker.c net/mlx4: suppress 'may be used uninitialized' warning 2017-04-20 13:19:21 -04:00
sense.c
srq.c net/mlx4_core: Use RCU to perform radix tree lookup for SRQ 2016-09-21 21:52:43 -04:00