[PATCH -mm] relayfs: support larger relay buffer
Pekka Enberg
penberg@cs.helsinki.fi
Wed Apr 16 09:34:00 GMT 2008
On Tue, Apr 15, 2008 at 6:27 PM, Masami Hiramatsu <mhiramat@redhat.com> wrote:
> Use vmalloc() and memset() instead of kcalloc() to allocate a page* array
> when the array size is bigger than one page. This enables relayfs to support
> bigger relay buffers than 64MB on 4k-page system, 512MB on 16k-page system.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
> ---
> @@ -130,7 +138,10 @@ static void *relay_alloc_buf(struct rcha
> depopulate:
> for (j = 0; j < i; j++)
> __free_page(buf->page_array[j]);
> - kfree(buf->page_array);
> + if (pa_size > PAGE_SIZE)
You can use is_vmalloc_addr() here.
> + vfree(buf->page_array);
> + else
> + kfree(buf->page_array);
> return NULL;
> }
>
More information about the Systemtap
mailing list