From: Matthew Dobson <colpatch@us.ibm.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Andi Kleen <ak@suse.de>, mbligh@aracnet.com, akpm@osdl.org
Subject: [PATCH] include/linux/gfp.h cleanup for NUMA API
Date: Wed, 21 Apr 2004 02:58:02 -0700 [thread overview]
Message-ID: <408645AA.5050400@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
Andi,
Here's a few cleanups to include/linux/gfp.h
1) Move the extern of alloc_pages_current() into #ifdef CONFIG_NUMA.
The only references to the function are in NUMA code in mempolicy.c
2) Remove the definitions of __alloc_page_vma(). They aren't used.
3) Move forward declaration of struct vm_area_struct to top of file.
-Matt
[-- Attachment #2: cleanup-gfp_h.patch --]
[-- Type: text/plain, Size: 1571 bytes --]
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.6-rc1-mm1/include/linux/gfp.h linux-2.6.6-cleanup-gfp_h/include/linux/gfp.h
--- linux-2.6.6-rc1-mm1/include/linux/gfp.h 2004-04-20 14:29:11.000000000 -0700
+++ linux-2.6.6-cleanup-gfp_h/include/linux/gfp.h 2004-04-21 14:47:11.000000000 -0700
@@ -6,6 +6,8 @@
#include <linux/linkage.h>
#include <linux/config.h>
+struct vm_area_struct;
+
/*
* GFP bitmasks..
*/
@@ -84,10 +86,9 @@ static inline struct page *alloc_pages_n
NODE_DATA(nid)->node_zonelists + (gfp_mask & GFP_ZONEMASK));
}
+#ifdef CONFIG_NUMA
extern struct page *alloc_pages_current(unsigned gfp_mask, unsigned order);
-struct vm_area_struct;
-#ifdef CONFIG_NUMA
static inline struct page *
alloc_pages(unsigned int gfp_mask, unsigned int order)
{
@@ -96,17 +97,15 @@ alloc_pages(unsigned int gfp_mask, unsig
return alloc_pages_current(gfp_mask, order);
}
-extern struct page *__alloc_page_vma(unsigned gfp_mask,
- struct vm_area_struct *vma, unsigned long off);
extern struct page *alloc_page_vma(unsigned gfp_mask,
struct vm_area_struct *vma, unsigned long addr);
-#else
+#else /* !CONFIG_NUMA */
#define alloc_pages(gfp_mask, order) \
alloc_pages_node(numa_node_id(), gfp_mask, order)
#define alloc_page_vma(gfp_mask, vma, addr) alloc_pages(gfp_mask, 0)
-#define __alloc_page_vma(gfp_mask, vma, addr) alloc_pages(gfp_mask, 0)
-#endif
+#endif /* CONFIG_NUMA */
+
#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
extern unsigned long FASTCALL(__get_free_pages(unsigned int gfp_mask, unsigned int order));
next reply other threads:[~2004-04-21 22:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-21 9:58 Matthew Dobson [this message]
2004-04-22 4:52 ` [PATCH] include/linux/gfp.h cleanup for NUMA API Andi Kleen
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=408645AA.5050400@us.ibm.com \
--to=colpatch@us.ibm.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
/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