Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1569880
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 5/9] treewide: use kv[mz]alloc* rather than opencoded variants |
| Date | 2017-01-30 17:40 +0100 |
| Message-ID | <t5n9M-6e5-27@gated-at.bofh.it> (permalink) |
| References | <t5gUF-2oF-3@gated-at.bofh.it> <t5gUG-2oF-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 01/30/2017 10:49 AM, 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 <= 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. > > Changes since v1 > - add kvmalloc_array - this might silently fix some overflow issues > because most users simply didn't check the overflow for the vmalloc > fallback. > > 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: 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: netdev@vger.kernel.org > Acked-by: Andreas Dilger <andreas.dilger@intel.com> # Lustre > Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> # Xen bits > 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 > Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-30 11:00 +0100
[PATCH 8/9] bcache: use kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-30 11:00 +0100
Re: [PATCH 8/9] bcache: use kvmalloc Vlastimil Babka <vbabka@suse.cz> - 2017-01-30 18:00 +0100
Re: [PATCH 8/9] bcache: use kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-30 18:30 +0100
[PATCH 9/9] net, bpf: use kvzalloc helper Michal Hocko <mhocko@kernel.org> - 2017-01-30 11:00 +0100
Re: [PATCH 9/9] net, bpf: use kvzalloc helper Michal Hocko <mhocko@kernel.org> - 2017-01-30 18:30 +0100
[PATCH 4/9] ila: simplify a strange allocation pattern Michal Hocko <mhocko@kernel.org> - 2017-01-30 11:00 +0100
Re: [PATCH 4/9] ila: simplify a strange allocation pattern Vlastimil Babka <vbabka@suse.cz> - 2017-01-30 16:30 +0100
[PATCH 2/9] mm: support __GFP_REPEAT in kvmalloc_node for >32kB Michal Hocko <mhocko@kernel.org> - 2017-01-30 11:00 +0100
[PATCH 7/9] md: use kvmalloc rather than opencoded variant Michal Hocko <mhocko@kernel.org> - 2017-01-30 11:00 +0100
Re: [PATCH 7/9] md: use kvmalloc rather than opencoded variant Vlastimil Babka <vbabka@suse.cz> - 2017-01-30 18:00 +0100
Re: [PATCH 7/9] md: use kvmalloc rather than opencoded variant Mikulas Patocka <mpatocka@redhat.com> - 2017-02-01 18:40 +0100
Re: [PATCH 7/9] md: use kvmalloc rather than opencoded variant Michal Hocko <mhocko@kernel.org> - 2017-02-01 19:00 +0100
Re: [PATCH 5/9] treewide: use kv[mz]alloc* rather than opencoded variants Leon Romanovsky <leon@kernel.org> - 2017-01-30 11:40 +0100
Re: [PATCH 5/9] treewide: use kv[mz]alloc* rather than opencoded variants Vlastimil Babka <vbabka@suse.cz> - 2017-01-30 17:40 +0100
Re: [PATCH 5/9] treewide: use kv[mz]alloc* rather than opencoded variants Kees Cook <keescook@chromium.org> - 2017-01-30 20:30 +0100
Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-02-05 11:30 +0100
csiph-web