Re: [PATCH] module: avoid call vmalloc if init size is zero

2012-01-30 Thread Rusty Russell
On Mon, 30 Jan 2012 11:28:12 +0400, Dmitry Antipov wrote: > On 01/27/2012 03:21 PM, Rusty Russell wrote: > > > Please fix __vmalloc_node_range() instead to return ZERO_SIZE_PTR. > > And of course, vfree() to use ZERO_OR_NULL_PTR(). > > For the convenience and uniformity, should {alloc,free}_per

Re: [PATCH] module: avoid call vmalloc if init size is zero

2012-01-29 Thread Dmitry Antipov
On 01/27/2012 03:21 PM, Rusty Russell wrote: Please fix __vmalloc_node_range() instead to return ZERO_SIZE_PTR. And of course, vfree() to use ZERO_OR_NULL_PTR(). For the convenience and uniformity, should {alloc,free}_percpu() be also modified in that way? Dmitry

Re: [PATCH] module: avoid call vmalloc if init size is zero

2012-01-27 Thread Rusty Russell
On Fri, 27 Jan 2012 11:19:16 +0400, Dmitry Antipov wrote: > For the architectures with it's own module_alloc(), if module init > size is zero, avoiding module_alloc_update_bounds() and memset() > no-op calls also eliminates warn_alloc_failed() zero-size warning > in __vmalloc_node_range(). > > S

[PATCH] module: avoid call vmalloc if init size is zero

2012-01-26 Thread Dmitry Antipov
For the architectures with it's own module_alloc(), if module init size is zero, avoiding module_alloc_update_bounds() and memset() no-op calls also eliminates warn_alloc_failed() zero-size warning in __vmalloc_node_range(). Signed-off-by: Dmitry Antipov --- kernel/module.c | 31 ++