Messages in this thread | | | Subject | Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants | From | Tariq Toukan <> | Date | Mon, 16 Jan 2017 10:18:48 +0200 |
| |
On 12/01/2017 5:37 PM, Michal Hocko wrote: > From: Michal Hocko <mhocko@suse.com> > > 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 < 64kB 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. > > 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: Kees Cook <keescook@chromium.org> > 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: Tariq Toukan <tariqt@mellanox.com> > Cc: Yishai Hadas <yishaih@mellanox.com> > Cc: Dan Williams <dan.j.williams@intel.com> > Cc: Oleg Drokin <oleg.drokin@intel.com> > Cc: Andreas Dilger <andreas.dilger@intel.com> > Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> > Cc: David Sterba <dsterba@suse.com> > Cc: "Yan, Zheng" <zyan@redhat.com> > Cc: Ilya Dryomov <idryomov@gmail.com> > Cc: Alexander Viro <viro@zeniv.linux.org.uk> > Cc: Alexei Starovoitov <ast@kernel.org> > Cc: Eric Dumazet <eric.dumazet@gmail.com> > Cc: netdev@vger.kernel.org > Signed-off-by: Michal Hocko <mhocko@suse.com> > --- Acked-by: Tariq Toukan <tariqt@mellanox.com> For the mlx4 parts.
Regards. Tariq
| |