From: Jeff Layton <jlayton@redhat.com>
To: linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org,
bfields@fieldses.org
Subject: [PATCH 1/3] VM: add kzalloc_node inline
Date: Tue, 03 Jun 2008 07:17:57 -0400 [thread overview]
Message-ID: <20080603111757.8769.69366.stgit@dantu.usersys.redhat.com> (raw)
...to get zeroed out memory from a particular NUMA node
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
include/linux/slab.h | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 805ed4b..c2ad350 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -276,6 +276,17 @@ static inline void *kzalloc(size_t size, gfp_t flags)
return kmalloc(size, flags | __GFP_ZERO);
}
+/**
+ * kzalloc_node - allocate zeroed memory from a particular memory node.
+ * @size: how many bytes of memory are required.
+ * @flags: the type of memory to allocate (see kmalloc).
+ * @node: memory node from which to allocate
+ */
+static inline void *kzalloc_node(size_t size, gfp_t flags, int node)
+{
+ return kmalloc_node(size, flags | __GFP_ZERO, node);
+}
+
#ifdef CONFIG_SLABINFO
extern const struct seq_operations slabinfo_op;
ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
next reply other threads:[~2008-06-03 11:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 11:17 Jeff Layton [this message]
2008-06-03 11:18 ` [PATCH 2/3] sunrpc: have pooled services make NUMA-friendly allocations Jeff Layton
2008-06-06 15:21 ` Jeff Layton
2008-06-06 15:41 ` J. Bruce Fields
2008-06-03 11:18 ` [PATCH 3/3] sunrpc: change default for pooled services to SVC_POOL_AUTO and make settings persistent Jeff Layton
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=20080603111757.8769.69366.stgit@dantu.usersys.redhat.com \
--to=jlayton@redhat.com \
--cc=bfields@fieldses.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.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
all inboxes | Powered by JetHome®