projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Use ZVC for free_pages
[deliverable/linux.git]
/
mm
/
vmstat.c
diff --git
a/mm/vmstat.c
b/mm/vmstat.c
index 5462106725d719de129ec92ec5d8bd977cad6a29..2386716f1754ed0867a9f6430dc3b7acd75ce8b7 100644
(file)
--- a/
mm/vmstat.c
+++ b/
mm/vmstat.c
@@
-16,30
+16,17
@@
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,
unsigned long *free, struct pglist_data *pgdat)
{
- struct zone *zones = pgdat->node_zones;
- int i;
-
*active = node_page_state(pgdat->node_id, NR_ACTIVE);
*inactive = node_page_state(pgdat->node_id, NR_INACTIVE);
*active = node_page_state(pgdat->node_id, NR_ACTIVE);
*inactive = node_page_state(pgdat->node_id, NR_INACTIVE);
- *free = 0;
- for (i = 0; i < MAX_NR_ZONES; i++) {
- *free += zones[i].free_pages;
- }
+ *free = node_page_state(pgdat->node_id, NR_FREE_PAGES);
}
void get_zone_counts(unsigned long *active,
unsigned long *inactive, unsigned long *free)
{
}
void get_zone_counts(unsigned long *active,
unsigned long *inactive, unsigned long *free)
{
- struct pglist_data *pgdat;
-
*active = global_page_state(NR_ACTIVE);
*inactive = global_page_state(NR_INACTIVE);
*active = global_page_state(NR_ACTIVE);
*inactive = global_page_state(NR_INACTIVE);
- *free = 0;
- for_each_online_pgdat(pgdat) {
- unsigned long l, m, n;
- __get_zone_counts(&l, &m, &n, pgdat);
- *free += n;
- }
+ *free = global_page_state(NR_FREE_PAGES);
}
#ifdef CONFIG_VM_EVENT_COUNTERS
}
#ifdef CONFIG_VM_EVENT_COUNTERS
@@
-454,6
+441,7
@@
const struct seq_operations fragmentation_op = {
static const char * const vmstat_text[] = {
/* Zoned VM counters */
static const char * const vmstat_text[] = {
/* Zoned VM counters */
+ "nr_free_pages",
"nr_active",
"nr_inactive",
"nr_anon_pages",
"nr_active",
"nr_inactive",
"nr_anon_pages",
@@
-534,7
+522,7
@@
static int zoneinfo_show(struct seq_file *m, void *arg)
"\n scanned %lu (a: %lu i: %lu)"
"\n spanned %lu"
"\n present %lu",
"\n scanned %lu (a: %lu i: %lu)"
"\n spanned %lu"
"\n present %lu",
- zone
->free_pages
,
+ zone
_page_state(zone, NR_FREE_PAGES)
,
zone->pages_min,
zone->pages_low,
zone->pages_high,
zone->pages_min,
zone->pages_low,
zone->pages_high,
This page took
0.024043 seconds
and
5
git commands to generate.