All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] printk.c: use ints instead of longs for logbuf index
Date: Mon, 19 Nov 2007 22:31:07 -0800	[thread overview]
Message-ID: <20071119223107.36e85982.akpm@linux-foundation.org> (raw)
In-Reply-To: <200711181932.12588.vda.linux@googlemail.com>

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.

      reply	other threads:[~2007-11-20  6:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19  3:32 [PATCH] printk.c: use ints instead of longs for logbuf index Denys Vlasenko
2007-11-20  6:31 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071119223107.36e85982.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vda.linux@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.