public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@redhat.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: David Wilder <dwilder@us.ibm.com>,
	Tom Zanussi <zanussi@comcast.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	systemtap-ml <systemtap@sources.redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm] relayfs: support larger relay buffer
Date: Wed, 16 Apr 2008 10:36:46 -0400	[thread overview]
Message-ID: <48060EFE.3000107@redhat.com> (raw)
In-Reply-To: <84144f020804160133ye2327b8wb3774e1e0ccf6ff8@mail.gmail.com>

Hi Pekka,

Pekka Enberg wrote:
> 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.

Thank you for your good advice!
I'll use that.

> 
>>  +               vfree(buf->page_array);
>>  +       else
>>  +               kfree(buf->page_array);
>>         return NULL;
>>   }
>>

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com


      reply	other threads:[~2008-04-16 14:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-15 15:27 [PATCH -mm] relayfs: support larger relay buffer Masami Hiramatsu
2008-04-16  4:22 ` Tom Zanussi
2008-04-16 16:19   ` Masami Hiramatsu
2008-04-16 18:03   ` [PATCH -mm] relayfs: support larger relay buffer take 2 Masami Hiramatsu
2008-04-16 18:21     ` Pekka J Enberg
2008-04-16 18:34       ` Masami Hiramatsu
2008-04-16 19:51         ` [PATCH -mm] relayfs: support larger relay buffer take 3 Masami Hiramatsu
2008-04-16 19:54           ` Pekka Enberg
2008-04-16 20:48           ` Andrew Morton
2008-04-16 21:00             ` Masami Hiramatsu
2008-04-17  4:05           ` Tom Zanussi
2008-04-16  8:33 ` [PATCH -mm] relayfs: support larger relay buffer Pekka Enberg
2008-04-16 14:36   ` Masami Hiramatsu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48060EFE.3000107@redhat.com \
    --to=mhiramat@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dwilder@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=systemtap@sources.redhat.com \
    --cc=zanussi@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox