From: Avi Kivity <avi@redhat.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: Changli Gao <xiaosuo@gmail.com>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
akpm@linux-foundation.org, paulmck@linux.vnet.ibm.com,
adobriyan@gmail.com, mingo@elte.hu, peterz@infradead.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: use kmalloc() to allocate fdmem if possible
Date: Mon, 03 May 2010 12:28:51 +0300 [thread overview]
Message-ID: <4BDE9753.1080106@redhat.com> (raw)
In-Reply-To: <4BDE95F2.1020506@suse.cz>
On 05/03/2010 12:22 PM, Jiri Slaby wrote:
> On 05/03/2010 11:18 AM, Avi Kivity wrote:
>
>> On 05/03/2010 12:03 PM, Jiri Slaby wrote:
>>
>>>>> Because vmalloc is used to allocate virtually contiguous memory. v in
>>>>> vmalloc means virtually.
>>>>>
>>>>>
>>>>>
>>>>>
>>>> A kmalloc()ed page is virtually contiguous, satisfying your requirement.
>>>>
>>>>
>>> But it won't work well for vmalloc_to_{page,pfn} and similar.
>>>
>> Modify vmalloc_to_{page,pfn} accordingly.
>>
> When you get a slub in the middle of page, how?
>
Er, right. So a separate API is needed for users who are interested in
memory, not pages.
>>> Some code
>>> may expect vmalloc result to be in the vmalloc area and page-aligned
>>> (both in position and size).
>>>
>>>
>> Both would be a bug IMO. vmalloc() follows kmalloc() and malloc() which
>> only guarantee natural alignment.
>>
> Nope, from what I understand, vmalloc aligns (uses page allocator). Even
> for purposes of vmalloc_to_*.
>
Correct, my mistake.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-05-03 9:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Alexander Viro <viro@zeniv.linux.org.uk>
2010-05-02 16:46 ` [PATCH] fs: use kmalloc() to allocate fdmem if possible Changli Gao
2010-05-02 17:31 ` Avi Kivity
2010-05-03 0:15 ` Tetsuo Handa
2010-05-03 6:06 ` Avi Kivity
2010-05-03 7:05 ` Changli Gao
2010-05-03 7:05 ` Changli Gao
2010-05-03 7:42 ` Avi Kivity
2010-05-03 7:52 ` Changli Gao
2010-05-03 7:52 ` Changli Gao
2010-05-03 8:49 ` Avi Kivity
2010-05-03 9:03 ` Jiri Slaby
2010-05-03 9:18 ` Avi Kivity
2010-05-03 9:22 ` Jiri Slaby
2010-05-03 9:25 ` Jiri Slaby
2010-05-03 9:28 ` Avi Kivity [this message]
2010-05-03 9:13 ` Eric Dumazet
2010-05-03 9:19 ` Jiri Slaby
2010-05-03 9:29 ` Eric Dumazet
2010-05-03 9:29 ` Eric Dumazet
2010-05-04 4:20 ` Changli Gao
2010-05-04 5:33 ` Eric Dumazet
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=4BDE9753.1080106@redhat.com \
--to=avi@redhat.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jslaby@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=peterz@infradead.org \
--cc=xiaosuo@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.