@@ -179,9 +179,12 @@ void refresh_zone_stat_thresholds(void)
*/
tolerate_drift = low_wmark_pages(zone) - min_wmark_pages(zone);
max_drift = num_online_cpus() * threshold;
- if (max_drift > tolerate_drift)
+ if (max_drift > tolerate_drift) {
zone->percpu_drift_mark = high_wmark_pages(zone) +
max_drift;
+ printk("zone %s drift mark %lu \n", zone->name,
+ zone->percpu_drift_mark);
+ }
}
}
@@ -189,12 +192,11 @@ void set_pgdat_percpu_threshold(pg_data_t *pgdat,
int (*calculate_pressure)(struct zone *))
{
struct mem_region *region;
- struct zone *zone;
int cpu;
int threshold;
int i;
- for (i = 0; i < pgdat->nr_zones; i++) {
+ for (i = 0; i < pgdat->nr_node_zone_types; i++) {
for_each_mem_region_in_node(region, pgdat->node_id) {
struct zone *zone = region->region_zones + i;
@@ -818,11 +820,12 @@ const char * const vmstat_text[] = {
#ifdef CONFIG_PROC_FS
static void frag_show_print(struct seq_file *m, pg_data_t *pgdat,
- struct zone *zone)
+ struct mem_region *region, struct zone *zone)
{
int order;
- seq_printf(m, "Node %d, zone %8s ", pgdat->node_id, zone->name);
+ seq_printf(m, "Node %d, REG %d, zone %8s ", pgdat->node_id,
+ region->region, zone->name);
for (order = 0; order < MAX_ORDER; ++order)
seq_printf(m, "%6lu ", zone->free_area[order].nr_free);
seq_putc(m, '\n');
@@ -838,14 +841,15 @@ static int frag_show(struct seq_file *m, void *arg)
return 0;
}
-static void pagetypeinfo_showfree_print(struct seq_file *m,
- pg_data_t *pgdat, struct zone *zone)
+static void pagetypeinfo_showfree_print(struct seq_file *m, pg_data_t *pgdat,
+ struct mem_region *region, struct zone *zone)
{
int order, mtype;
for (mtype = 0; mtype < MIGRATE_TYPES; mtype++) {
- seq_printf(m, "Node %4d, zone %8s, type %12s ",
+ seq_printf(m, "Node %4d, Region %d, zone %8s, type %12s ",
pgdat->node_id,
+ region->region,
zone->name,
migratetype_names[mtype]);
for (order = 0; order < MAX_ORDER; ++order) {
@@ -880,8 +884,8 @@ static int pagetypeinfo_showfree(struct seq_file *m, void *arg)
return 0;
}
-static void pagetypeinfo_showblockcount_print(struct seq_file *m,
- pg_data_t *pgdat, struct zone *zone)
+static void pagetypeinfo_showblockcount_print(struct seq_file *m, pg_data_t *pgdat,
+ struct mem_region *region, struct zone *zone)
{
int mtype;
unsigned long pfn;
@@ -908,7 +912,7 @@ static void pagetypeinfo_showblockcount_print(struct seq_file *m,
}
/* Print counts */
- seq_printf(m, "Node %d, zone %8s ", pgdat->node_id, zone->name);
+ seq_printf(m, "Node %d, Region %d, zone %8s ", pgdat->node_id, region->region, zone->name);
for (mtype = 0; mtype < MIGRATE_TYPES; mtype++)
seq_printf(m, "%12lu ", count[mtype]);
seq_putc(m, '\n');
@@ -989,10 +993,11 @@ static const struct file_operations pagetypeinfo_file_ops = {
};
static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
- struct zone *zone)
+ struct mem_region *region, struct zone *zone)
{
int i;
- seq_printf(m, "Node %d, zone %8s", pgdat->node_id, zone->name);
+ seq_printf(m, "Node %d, Region %d, zone %8s", pgdat->node_id,
+ region->region, zone->name);
seq_printf(m,
"\n pages free %lu"
"\n min %lu"