question: why use vzalloc() and vzfree() in mem_cgroup_alloc() and mem_cgroup_free()

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

 



context:

While testing patches from Glauber Costa, "adding support
for tcp memory allocation in kmem cgroup", we hit a
BUG_ON(in_interrupt()) in vfree(). The code path in question
is taken because the izeof(struct mem_cgroup) is
>= PAGE_SIZE in the call to mem_cgroup_free(), 

Since socket may get free in an interrupt context,
the combination of vzalloc(), vfree() should not be used
when accounting for socket mem (unless the code is modified).

question:

Is there reasons why vzalloc() is used in mem_cgroup_alloc() ?
    . are we seeing mem fragmentations to level that fail
      kzalloc() or kmalloc(). 
    . do we have empirical data that shows the allocation failure
      rate for kmalloc(), kzalloc() per alloc size (num pages)
      


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]