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(),
>= 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)