Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-06 Thread Michal Hocko
On Fri 06-01-17 15:36:04, Vlastimil Babka wrote: > On 01/04/2017 03:20 PM, Michal Hocko wrote: > > diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c > > index 2ff499680cc6..0a5cc1237afe 100644 > > --- a/net/netfilter/x_tables.c > > +++ b/net/netfilter/x_tables.c > > @@ -712,17 +712,8

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-06 Thread Vlastimil Babka
On 01/02/2017 02:37 PM, Michal Hocko wrote: > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -514,18 +514,9 @@ long vhost_dev_set_owner(struct vhost_dev *dev) > } > EXPORT_SYMBOL_GPL(vhost_dev_set_owner); > > -static void *vhost_kvzalloc(unsigned long size) > -{ > - void *n

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-06 Thread Michal Hocko
On Fri 06-01-17 14:29:33, Vlastimil Babka wrote: > On 01/02/2017 02:37 PM, Michal Hocko wrote: > > --- a/drivers/vhost/vhost.c > > +++ b/drivers/vhost/vhost.c > > @@ -514,18 +514,9 @@ long vhost_dev_set_owner(struct vhost_dev *dev) > > } > > EXPORT_SYMBOL_GPL(vhost_dev_set_owner); > > > > -stat

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-06 Thread Vlastimil Babka
On 01/04/2017 03:20 PM, Michal Hocko wrote: > diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c > index 2ff499680cc6..0a5cc1237afe 100644 > --- a/net/netfilter/x_tables.c > +++ b/net/netfilter/x_tables.c > @@ -712,17 +712,8 @@ EXPORT_SYMBOL(xt_check_entry_offsets); > */ > unsigned

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-05 Thread Michal Hocko
OK, so I've checked the open coded implementations and converted most of them. There are few which are either confused and need some special handling or need double checking. I can fold this into the original patch or keep it as a separate patch. Whatever works better for others. --- >From 72a8493

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-05 Thread Vlastimil Babka
On 01/02/2017 02:37 PM, Michal Hocko wrote: > From: Michal Hocko > > Using kmalloc with the vmalloc fallback for larger allocations is a > common pattern in the kernel code. Yet we do not have any common helper > for that and so users have invented their own helpers. Some of them are > really crea

[f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-05 Thread Michal Hocko
From: Michal Hocko Using kmalloc with the vmalloc fallback for larger allocations is a common pattern in the kernel code. Yet we do not have any common helper for that and so users have invented their own helpers. Some of them are really creative when doing so. Let's just add kv[mz]alloc and make

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-05 Thread Michal Hocko
On Mon 02-01-17 07:55:22, Joe Perches wrote: > On Mon, 2017-01-02 at 14:37 +0100, Michal Hocko wrote: > > From: Michal Hocko > > > > Using kmalloc with the vmalloc fallback for larger allocations is a > > common pattern in the kernel code. Yet we do not have any common helper > > for that and so

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-05 Thread Joe Perches
On Mon, 2017-01-02 at 14:37 +0100, Michal Hocko wrote: > From: Michal Hocko > > Using kmalloc with the vmalloc fallback for larger allocations is a > common pattern in the kernel code. Yet we do not have any common helper > for that and so users have invented their own helpers. Some of them are >

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-05 Thread Michal Hocko
On Tue 03-01-17 11:23:04, Vlastimil Babka wrote: > On 01/02/2017 02:37 PM, Michal Hocko wrote: > > From: Michal Hocko > > > > Using kmalloc with the vmalloc fallback for larger allocations is a > > common pattern in the kernel code. Yet we do not have any common helper > > for that and so users h