* [PATCH] include/linux/gfp.h cleanup for NUMA API
@ 2004-04-21 9:58 Matthew Dobson
2004-04-22 4:52 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Dobson @ 2004-04-21 9:58 UTC (permalink / raw)
To: lkml; +Cc: Andi Kleen, mbligh, akpm
[-- 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));
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] include/linux/gfp.h cleanup for NUMA API
2004-04-21 9:58 [PATCH] include/linux/gfp.h cleanup for NUMA API Matthew Dobson
@ 2004-04-22 4:52 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2004-04-22 4:52 UTC (permalink / raw)
To: Matthew Dobson; +Cc: lkml, Andi Kleen, mbligh, akpm
On Wed, Apr 21, 2004 at 02:58:02AM -0700, Matthew Dobson wrote:
> 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.
I already did (2). Rest looks ok too.
-Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-22 4:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-21 9:58 [PATCH] include/linux/gfp.h cleanup for NUMA API Matthew Dobson
2004-04-22 4:52 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox