]> err.no Git - linux-2.6/blobdiff - include/linux/mmzone.h
[PATCH] sched: reduce overhead of calc_load
[linux-2.6] / include / linux / mmzone.h
index 96eb08025092a7c62378ea0e34934cc61ed01027..b5c21122c2996bcee2a449188748f35e561ca0c9 100644 (file)
@@ -307,7 +307,6 @@ typedef struct pglist_data {
        unsigned long node_spanned_pages; /* total size of physical page
                                             range, including holes */
        int node_id;
-       struct pglist_data *pgdat_next;
        wait_queue_head_t kswapd_wait;
        struct task_struct *kswapd;
        int kswapd_max_order;
@@ -324,8 +323,6 @@ typedef struct pglist_data {
 
 #include <linux/memory_hotplug.h>
 
-extern struct pglist_data *pgdat_list;
-
 void __get_zone_counts(unsigned long *active, unsigned long *inactive,
                        unsigned long *free, struct pglist_data *pgdat);
 void get_zone_counts(unsigned long *active, unsigned long *inactive,
@@ -421,20 +418,9 @@ extern struct pglist_data contig_page_data;
 
 #endif /* !CONFIG_NEED_MULTIPLE_NODES */
 
-static inline struct pglist_data *first_online_pgdat(void)
-{
-       return NODE_DATA(first_online_node);
-}
-
-static inline struct pglist_data *next_online_pgdat(struct pglist_data *pgdat)
-{
-       int nid = next_online_node(pgdat->node_id);
-
-       if (nid == MAX_NUMNODES)
-               return NULL;
-       return NODE_DATA(nid);
-}
-
+extern struct pglist_data *first_online_pgdat(void);
+extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat);
+extern struct zone *next_zone(struct zone *zone);
 
 /**
  * for_each_pgdat - helper macro to iterate over all nodes
@@ -444,27 +430,6 @@ static inline struct pglist_data *next_online_pgdat(struct pglist_data *pgdat)
        for (pgdat = first_online_pgdat();              \
             pgdat;                                     \
             pgdat = next_online_pgdat(pgdat))
-
-/*
- * next_zone - helper magic for for_each_zone()
- * Thanks to William Lee Irwin III for this piece of ingenuity.
- */
-static inline struct zone *next_zone(struct zone *zone)
-{
-       pg_data_t *pgdat = zone->zone_pgdat;
-
-       if (zone < pgdat->node_zones + MAX_NR_ZONES - 1)
-               zone++;
-       else {
-               pgdat = next_online_pgdat(pgdat);
-               if (pgdat)
-                       zone = pgdat->node_zones;
-               else
-                       zone = NULL;
-       }
-       return zone;
-}
-
 /**
  * for_each_zone - helper macro to iterate over all memory zones
  * @zone - pointer to struct zone variable