[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84144f020804160133ye2327b8wb3774e1e0ccf6ff8@mail.gmail.com>
Date: Wed, 16 Apr 2008 11:33:01 +0300
From: "Pekka Enberg" <penberg@...helsinki.fi>
To: "Masami Hiramatsu" <mhiramat@...hat.com>
Cc: "David Wilder" <dwilder@...ibm.com>,
"Tom Zanussi" <zanussi@...cast.net>,
"Andrew Morton" <akpm@...ux-foundation.org>,
systemtap-ml <systemtap@...rces.redhat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -mm] relayfs: support larger relay buffer
On Tue, Apr 15, 2008 at 6:27 PM, Masami Hiramatsu <mhiramat@...hat.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@...hat.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;
> }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists