linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* question: why use vzalloc() and vzfree() in mem_cgroup_alloc() and mem_cgroup_free()
@ 2011-12-14 20:12 Laurent Chavey
  2011-12-15  0:52 ` Chris Snook
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Chavey @ 2011-12-14 20:12 UTC (permalink / raw)
  To: linux-mm; +Cc: LKML, laurent chavey, glommer

[-- Attachment #1: Type: text/plain, Size: 740 bytes --]

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)

[-- Attachment #2: Type: text/html, Size: 3248 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-15  0:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-14 20:12 question: why use vzalloc() and vzfree() in mem_cgroup_alloc() and mem_cgroup_free() Laurent Chavey
2011-12-15  0:52 ` Chris Snook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox