From: Laurent Chavey <chavey@google.com>
To: linux-mm@kvack.org
Cc: LKML <linux-kernel@vger.kernel.org>,
laurent chavey <chavey@google.com>,
glommer@parallels.com
Subject: question: why use vzalloc() and vzfree() in mem_cgroup_alloc() and mem_cgroup_free()
Date: Wed, 14 Dec 2011 12:12:41 -0800 [thread overview]
Message-ID: <CAEas1LKNMSxhp-7DpsOOCu0fx6kx5ya-zqsZQgnf6JwzX0E0gw@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2011-12-14 20:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 20:12 Laurent Chavey [this message]
2011-12-15 0:52 ` Chris Snook
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=CAEas1LKNMSxhp-7DpsOOCu0fx6kx5ya-zqsZQgnf6JwzX0E0gw@mail.gmail.com \
--to=chavey@google.com \
--cc=glommer@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox