diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
commit | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (patch) | |
tree | 2624a44924c625c367f3cebf937853b9da2de282 /drivers/base | |
parent | 9f2fa466383ce100b90fe52cb4489d7a26bf72a9 (diff) | |
parent | 29454dde27d8e340bb1987bad9aa504af7081eba (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/bus.c | 1 | ||||
-rw-r--r-- | drivers/base/class.c | 1 | ||||
-rw-r--r-- | drivers/base/core.c | 1 | ||||
-rw-r--r-- | drivers/base/driver.c | 1 | ||||
-rw-r--r-- | drivers/base/node.c | 63 | ||||
-rw-r--r-- | drivers/base/power/main.c | 1 | ||||
-rw-r--r-- | drivers/base/power/shutdown.c | 1 | ||||
-rw-r--r-- | drivers/base/sys.c | 1 |
8 files changed, 20 insertions, 50 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 050d86d0b87..83fa8b291a5 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -8,7 +8,6 @@ * */ -#include <linux/config.h> #include <linux/device.h> #include <linux/module.h> #include <linux/errno.h> diff --git a/drivers/base/class.c b/drivers/base/class.c index 9aa12746026..de8908320f2 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -10,7 +10,6 @@ * */ -#include <linux/config.h> #include <linux/device.h> #include <linux/module.h> #include <linux/init.h> diff --git a/drivers/base/core.c b/drivers/base/core.c index 27c2176895d..b21f864c9ce 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -8,7 +8,6 @@ * */ -#include <linux/config.h> #include <linux/device.h> #include <linux/err.h> #include <linux/init.h> diff --git a/drivers/base/driver.c b/drivers/base/driver.c index b400314e1c6..562600dd540 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -8,7 +8,6 @@ * */ -#include <linux/config.h> #include <linux/device.h> #include <linux/module.h> #include <linux/errno.h> diff --git a/drivers/base/node.c b/drivers/base/node.c index eae2bdc183b..d7de1753e09 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -40,24 +40,13 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) int n; int nid = dev->id; struct sysinfo i; - struct page_state ps; unsigned long inactive; unsigned long active; unsigned long free; si_meminfo_node(&i, nid); - get_page_state_node(&ps, nid); __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid)); - /* Check for negative values in these approximate counters */ - if ((long)ps.nr_dirty < 0) - ps.nr_dirty = 0; - if ((long)ps.nr_writeback < 0) - ps.nr_writeback = 0; - if ((long)ps.nr_mapped < 0) - ps.nr_mapped = 0; - if ((long)ps.nr_slab < 0) - ps.nr_slab = 0; n = sprintf(buf, "\n" "Node %d MemTotal: %8lu kB\n" @@ -71,7 +60,12 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) "Node %d LowFree: %8lu kB\n" "Node %d Dirty: %8lu kB\n" "Node %d Writeback: %8lu kB\n" + "Node %d FilePages: %8lu kB\n" "Node %d Mapped: %8lu kB\n" + "Node %d AnonPages: %8lu kB\n" + "Node %d PageTables: %8lu kB\n" + "Node %d NFS Unstable: %8lu kB\n" + "Node %d Bounce: %8lu kB\n" "Node %d Slab: %8lu kB\n", nid, K(i.totalram), nid, K(i.freeram), @@ -82,10 +76,15 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) nid, K(i.freehigh), nid, K(i.totalram - i.totalhigh), nid, K(i.freeram - i.freehigh), - nid, K(ps.nr_dirty), - nid, K(ps.nr_writeback), - nid, K(ps.nr_mapped), - nid, K(ps.nr_slab)); + nid, K(node_page_state(nid, NR_FILE_DIRTY)), + nid, K(node_page_state(nid, NR_WRITEBACK)), + nid, K(node_page_state(nid, NR_FILE_PAGES)), + nid, K(node_page_state(nid, NR_FILE_MAPPED)), + nid, K(node_page_state(nid, NR_ANON_PAGES)), + nid, K(node_page_state(nid, NR_PAGETABLE)), + nid, K(node_page_state(nid, NR_UNSTABLE_NFS)), + nid, K(node_page_state(nid, NR_BOUNCE)), + nid, K(node_page_state(nid, NR_SLAB))); n += hugetlb_report_node_meminfo(nid, buf + n); return n; } @@ -95,28 +94,6 @@ static SYSDEV_ATTR(meminfo, S_IRUGO, node_read_meminfo, NULL); static ssize_t node_read_numastat(struct sys_device * dev, char * buf) { - unsigned long numa_hit, numa_miss, interleave_hit, numa_foreign; - unsigned long local_node, other_node; - int i, cpu; - pg_data_t *pg = NODE_DATA(dev->id); - numa_hit = 0; - numa_miss = 0; - interleave_hit = 0; - numa_foreign = 0; - local_node = 0; - other_node = 0; - for (i = 0; i < MAX_NR_ZONES; i++) { - struct zone *z = &pg->node_zones[i]; - for_each_online_cpu(cpu) { - struct per_cpu_pageset *ps = zone_pcp(z,cpu); - numa_hit += ps->numa_hit; - numa_miss += ps->numa_miss; - numa_foreign += ps->numa_foreign; - interleave_hit += ps->interleave_hit; - local_node += ps->local_node; - other_node += ps->other_node; - } - } return sprintf(buf, "numa_hit %lu\n" "numa_miss %lu\n" @@ -124,12 +101,12 @@ static ssize_t node_read_numastat(struct sys_device * dev, char * buf) "interleave_hit %lu\n" "local_node %lu\n" "other_node %lu\n", - numa_hit, - numa_miss, - numa_foreign, - interleave_hit, - local_node, - other_node); + node_page_state(dev->id, NUMA_HIT), + node_page_state(dev->id, NUMA_MISS), + node_page_state(dev->id, NUMA_FOREIGN), + node_page_state(dev->id, NUMA_INTERLEAVE_HIT), + node_page_state(dev->id, NUMA_LOCAL), + node_page_state(dev->id, NUMA_OTHER)); } static SYSDEV_ATTR(numastat, S_IRUGO, node_read_numastat, NULL); diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 0d2e101e4f1..fdfa3d0cf6a 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -19,7 +19,6 @@ * ancestral dependencies that the subsystem list maintains. */ -#include <linux/config.h> #include <linux/device.h> #include "power.h" diff --git a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c index 8826a5b6673..3483ae4d57f 100644 --- a/drivers/base/power/shutdown.c +++ b/drivers/base/power/shutdown.c @@ -8,7 +8,6 @@ * */ -#include <linux/config.h> #include <linux/device.h> #include <asm/semaphore.h> diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 6858178b3af..04e5db445c7 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c @@ -12,7 +12,6 @@ * add themselves as children of the system bus. */ -#include <linux/config.h> #include <linux/sysdev.h> #include <linux/err.h> #include <linux/module.h> |