lkml.org 
[lkml]   [2007]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk.c: use ints instead of longs for logbuf index
On Sun, 18 Nov 2007 19:32:12 -0800 Denys Vlasenko <vda.linux@googlemail.com> wrote:

> Subject: [PATCH] printk.c: use ints instead of longs for logbuf index

"unsigned ints". It matters - using ints would fill the code with bugs.

> Date: Sun, 18 Nov 2007 19:32:12 -0800
> User-Agent: KMail/1.9.1
>
> Hi Andrew,
>
> This patch stops using unsigned _longs_ for printk
> buffer indexes. Log buffer is way smaller than 2 gigabytes
> and unsigned ints will work too . Indeed, they do work nicely
> on all 32-bit platforms where longs and ints are the same.
>
> With this patch, we have following size savings on amd64:
>
> text data bss dec hex filename
> 5997 313 17736 24046 5dee 2.6.23.1.t64/kernel/printk.o
> 5858 313 17700 23871 5d3f 2.6.23.1.printk.t64/kernel/printk.o

I can imagine someone using an 8GB log buffer for crazy
i-cant-be-bothered-using-relayfs stuff.

Oh well, they'll live.
-
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: 2007-11-20 07:33    [W:0.050 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site