Commit 05a0416be2b88d859efcbc4a4290555a04d169a1
Committed by
Linus Torvalds
1 parent
9195481d2f
Exists in
master
and in
4 other branches
[PATCH] Drop __get_zone_counts()
Values are readily available via ZVC per node and global sums. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 4 changed files with 4 additions and 23 deletions Side-by-side Diff
drivers/base/node.c
... | ... | @@ -40,14 +40,9 @@ |
40 | 40 | int n; |
41 | 41 | int nid = dev->id; |
42 | 42 | struct sysinfo i; |
43 | - unsigned long inactive; | |
44 | - unsigned long active; | |
45 | - unsigned long free; | |
46 | 43 | |
47 | 44 | si_meminfo_node(&i, nid); |
48 | - __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid)); | |
49 | 45 | |
50 | - | |
51 | 46 | n = sprintf(buf, "\n" |
52 | 47 | "Node %d MemTotal: %8lu kB\n" |
53 | 48 | "Node %d MemFree: %8lu kB\n" |
... | ... | @@ -74,8 +69,8 @@ |
74 | 69 | nid, K(i.totalram), |
75 | 70 | nid, K(i.freeram), |
76 | 71 | nid, K(i.totalram - i.freeram), |
77 | - nid, K(active), | |
78 | - nid, K(inactive), | |
72 | + nid, node_page_state(nid, NR_ACTIVE), | |
73 | + nid, node_page_state(nid, NR_INACTIVE), | |
79 | 74 | #ifdef CONFIG_HIGHMEM |
80 | 75 | nid, K(i.totalhigh), |
81 | 76 | nid, K(i.freehigh), |
include/linux/mmzone.h
... | ... | @@ -444,8 +444,6 @@ |
444 | 444 | |
445 | 445 | #include <linux/memory_hotplug.h> |
446 | 446 | |
447 | -void __get_zone_counts(unsigned long *active, unsigned long *inactive, | |
448 | - unsigned long *free, struct pglist_data *pgdat); | |
449 | 447 | void get_zone_counts(unsigned long *active, unsigned long *inactive, |
450 | 448 | unsigned long *free); |
451 | 449 | void build_all_zonelists(void); |
mm/readahead.c
... | ... | @@ -575,11 +575,7 @@ |
575 | 575 | */ |
576 | 576 | unsigned long max_sane_readahead(unsigned long nr) |
577 | 577 | { |
578 | - unsigned long active; | |
579 | - unsigned long inactive; | |
580 | - unsigned long free; | |
581 | - | |
582 | - __get_zone_counts(&active, &inactive, &free, NODE_DATA(numa_node_id())); | |
583 | - return min(nr, (inactive + free) / 2); | |
578 | + return min(nr, (node_page_state(numa_node_id(), NR_INACTIVE) | |
579 | + + node_page_state(numa_node_id(), NR_FREE_PAGES)) / 2); | |
584 | 580 | } |
mm/vmstat.c
... | ... | @@ -13,14 +13,6 @@ |
13 | 13 | #include <linux/module.h> |
14 | 14 | #include <linux/cpu.h> |
15 | 15 | |
16 | -void __get_zone_counts(unsigned long *active, unsigned long *inactive, | |
17 | - unsigned long *free, struct pglist_data *pgdat) | |
18 | -{ | |
19 | - *active = node_page_state(pgdat->node_id, NR_ACTIVE); | |
20 | - *inactive = node_page_state(pgdat->node_id, NR_INACTIVE); | |
21 | - *free = node_page_state(pgdat->node_id, NR_FREE_PAGES); | |
22 | -} | |
23 | - | |
24 | 16 | void get_zone_counts(unsigned long *active, |
25 | 17 | unsigned long *inactive, unsigned long *free) |
26 | 18 | { |