lkml.org 
[lkml]   [2003]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] laptop-mode for 2.6, version 3
Minor nitpicks below

Em Wed, Dec 24, 2003 at 04:25:48PM +0100, Bart Samwel escreveu:
> diff -baur --speed-large-files linux-2.6.0/mm/page-writeback.c linux-2.6.0-withlaptopmode/mm/page-writeback.c
> --- linux-2.6.0/mm/page-writeback.c 2003-12-24 05:19:46.000000000 +0100
> +++ linux-2.6.0-withlaptopmode/mm/page-writeback.c 2003-12-24 15:49:55.000000000 +0100
> @@ -28,6 +28,7 @@
> #include <linux/smp.h>
> #include <linux/sysctl.h>
> #include <linux/cpu.h>
> +#include <linux/quotaops.h>
>
> /*
> * The maximum number of pages to writeout in a single bdflush/kupdate
> @@ -81,6 +82,16 @@
> */
> int dirty_expire_centisecs = 30 * 100;
>
> +/*
> + * Flag that makes the machine dump writes/reads and block dirtyings.
> + */
> +int block_dump = 0;
> +
> +/*
> + * Flag that puts the machine in "laptop mode".
> + */
> +int laptop_mode = 0;
> +

No need to set a global variable to 0, if you don't set it'll go to the
.bss section and the kernel will zero it out for us, and we reclaim
2 * sizeof(int) from the kernel image. This is common style in most parts
of the kernel.

- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.061 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site