* + mmzone-add-pgdat_end_pfnis_empty-helpers-consolidate.patch added to -mm tree
@ 2013-02-02 0:39 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2013-02-02 0:39 UTC (permalink / raw)
To: mm-commits; +Cc: jmesmon, catalin.marinas, cody, dave, hannes, mel
The patch titled
Subject: mmzone: add pgdat_{end_pfn,is_empty}() helpers & consolidate.
has been added to the -mm tree. Its filename is
mmzone-add-pgdat_end_pfnis_empty-helpers-consolidate.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Cody P Schafer <jmesmon@gmail.com>
Subject: mmzone: add pgdat_{end_pfn,is_empty}() helpers & consolidate.
Add pgdat_end_pfn() and pgdat_is_empty() helpers which match the similar
zone_*() functions.
Change node_end_pfn() to be a wrapper of pgdat_end_pfn().
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: David Hansen <dave@linux.vnet.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/mmzone.h | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff -puN include/linux/mmzone.h~mmzone-add-pgdat_end_pfnis_empty-helpers-consolidate include/linux/mmzone.h
--- a/include/linux/mmzone.h~mmzone-add-pgdat_end_pfnis_empty-helpers-consolidate
+++ a/include/linux/mmzone.h
@@ -756,11 +756,17 @@ typedef struct pglist_data {
#define nid_page_nr(nid, pagenr) pgdat_page_nr(NODE_DATA(nid),(pagenr))
#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
+#define node_end_pfn(nid) pgdat_end_pfn(NODE_DATA(nid))
-#define node_end_pfn(nid) ({\
- pg_data_t *__pgdat = NODE_DATA(nid);\
- __pgdat->node_start_pfn + __pgdat->node_spanned_pages;\
-})
+static inline unsigned long pgdat_end_pfn(pg_data_t *pgdat)
+{
+ return pgdat->node_start_pfn + pgdat->node_spanned_pages;
+}
+
+static inline bool pgdat_is_empty(pg_data_t *pgdat)
+{
+ return !pgdat->node_start_pfn && !pgdat->node_spanned_pages;
+}
#include <linux/memory_hotplug.h>
_
Patches currently in -mm which might be from jmesmon@gmail.com are
mm-page_alloc-add-a-vm_bug-in-__free_one_page-if-the-zone-is-uninitialized.patch
mmzone-add-pgdat_end_pfnis_empty-helpers-consolidate.patch
mm-add-helper-ensure_zone_is_initialized.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-02-02 0:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-02 0:39 + mmzone-add-pgdat_end_pfnis_empty-helpers-consolidate.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.