Re: [PATCH] fs: use kmalloc() to allocate fdmem if possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux