* [2.6 patch] mm/vmstat.c: possible cleanups
@ 2007-07-05 23:23 Adrian Bunk
2007-07-06 17:49 ` Christoph Lameter
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2007-07-05 23:23 UTC (permalink / raw)
To: Christoph Lameter; +Cc: linux-kernel
This patch contains the following possible cleanups:
- make the needlessly global setup_vmstat() static
- #if 0 the unused refresh_vm_stats()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
mm/vmstat.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- linux-2.6.22-rc6-mm1/mm/vmstat.c.old 2007-07-05 16:54:39.000000000 +0200
+++ linux-2.6.22-rc6-mm1/mm/vmstat.c 2007-07-05 16:55:42.000000000 +0200
@@ -353,6 +353,8 @@
}
}
+#if 0
+
static void __refresh_cpu_vm_stats(void *dummy)
{
refresh_cpu_vm_stats(smp_processor_id());
@@ -370,6 +372,8 @@
}
EXPORT_SYMBOL(refresh_vm_stats);
+#endif /* 0 */
+
#endif
#ifdef CONFIG_NUMA
@@ -957,7 +961,7 @@
static struct notifier_block __cpuinitdata vmstat_notifier =
{ &vmstat_cpuup_callback, NULL, 0 };
-int __init setup_vmstat(void)
+static int __init setup_vmstat(void)
{
int cpu;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] mm/vmstat.c: possible cleanups
2007-07-05 23:23 [2.6 patch] mm/vmstat.c: possible cleanups Adrian Bunk
@ 2007-07-06 17:49 ` Christoph Lameter
2007-07-06 18:13 ` Adrian Bunk
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Lameter @ 2007-07-06 17:49 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-kernel
On Fri, 6 Jul 2007, Adrian Bunk wrote:
> This patch contains the following possible cleanups:
> - make the needlessly global setup_vmstat() static
Ok.
> - #if 0 the unused refresh_vm_stats()
Hmmm... This may be needed by the cpu idle code to update the vm stats
before going idle.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] mm/vmstat.c: possible cleanups
2007-07-06 17:49 ` Christoph Lameter
@ 2007-07-06 18:13 ` Adrian Bunk
2007-07-06 19:21 ` Christoph Lameter
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2007-07-06 18:13 UTC (permalink / raw)
To: Christoph Lameter; +Cc: linux-kernel
On Fri, Jul 06, 2007 at 10:49:02AM -0700, Christoph Lameter wrote:
> On Fri, 6 Jul 2007, Adrian Bunk wrote:
>
> > This patch contains the following possible cleanups:
> > - make the needlessly global setup_vmstat() static
>
> Ok.
>
> > - #if 0 the unused refresh_vm_stats()
>
> Hmmm... This may be needed by the cpu idle code to update the vm stats
> before going idle.
Since 1 year it's making the kernel image larger without having a single
user.
And if it will one day get a user, removing the #if 0 will be trivial.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] mm/vmstat.c: possible cleanups
2007-07-06 18:13 ` Adrian Bunk
@ 2007-07-06 19:21 ` Christoph Lameter
2007-07-09 14:57 ` [2.6 patch] mm/vmstat.c: cleanups Adrian Bunk
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Lameter @ 2007-07-06 19:21 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-kernel
On Fri, 6 Jul 2007, Adrian Bunk wrote:
> > Hmmm... This may be needed by the cpu idle code to update the vm stats
> > before going idle.
>
> Since 1 year it's making the kernel image larger without having a single
> user.
>
> And if it will one day get a user, removing the #if 0 will be trivial.
Then just remove the whole function. the #if 0 is ugly.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [2.6 patch] mm/vmstat.c: cleanups
2007-07-06 19:21 ` Christoph Lameter
@ 2007-07-09 14:57 ` Adrian Bunk
2007-07-09 15:44 ` Christoph Lameter
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2007-07-09 14:57 UTC (permalink / raw)
To: Christoph Lameter; +Cc: linux-kernel
On Fri, Jul 06, 2007 at 12:21:52PM -0700, Christoph Lameter wrote:
> On Fri, 6 Jul 2007, Adrian Bunk wrote:
>
> > > Hmmm... This may be needed by the cpu idle code to update the vm stats
> > > before going idle.
> >
> > Since 1 year it's making the kernel image larger without having a single
> > user.
> >
> > And if it will one day get a user, removing the #if 0 will be trivial.
>
> Then just remove the whole function. the #if 0 is ugly.
Updated patch below.
cu
Adrian
<-- snip -->
This patch contains the following cleanups:
- make the needlessly global setup_vmstat() static
- remove the unused refresh_vm_stats()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
mm/vmstat.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
--- linux-2.6.22-rc6-mm1/mm/vmstat.c.old 2007-07-05 16:54:39.000000000 +0200
+++ linux-2.6.22-rc6-mm1/mm/vmstat.c 2007-07-08 22:27:26.000000000 +0200
@@ -353,23 +353,6 @@
}
}
-static void __refresh_cpu_vm_stats(void *dummy)
-{
- refresh_cpu_vm_stats(smp_processor_id());
-}
-
-/*
- * Consolidate all counters.
- *
- * Note that the result is less inaccurate but still inaccurate
- * if concurrent processes are allowed to run.
- */
-void refresh_vm_stats(void)
-{
- on_each_cpu(__refresh_cpu_vm_stats, NULL, 0, 1);
-}
-EXPORT_SYMBOL(refresh_vm_stats);
-
#endif
#ifdef CONFIG_NUMA
@@ -957,7 +940,7 @@
static struct notifier_block __cpuinitdata vmstat_notifier =
{ &vmstat_cpuup_callback, NULL, 0 };
-int __init setup_vmstat(void)
+static int __init setup_vmstat(void)
{
int cpu;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] mm/vmstat.c: cleanups
2007-07-09 14:57 ` [2.6 patch] mm/vmstat.c: cleanups Adrian Bunk
@ 2007-07-09 15:44 ` Christoph Lameter
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Lameter @ 2007-07-09 15:44 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-kernel
On Mon, 9 Jul 2007, Adrian Bunk wrote:
> > Then just remove the whole function. the #if 0 is ugly.
>
> Updated patch below.
Thanks.
Acked-by: Christoph Lameter <clameter@sgi.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-07-09 15:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-05 23:23 [2.6 patch] mm/vmstat.c: possible cleanups Adrian Bunk
2007-07-06 17:49 ` Christoph Lameter
2007-07-06 18:13 ` Adrian Bunk
2007-07-06 19:21 ` Christoph Lameter
2007-07-09 14:57 ` [2.6 patch] mm/vmstat.c: cleanups Adrian Bunk
2007-07-09 15:44 ` Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox