public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Read <rread@datarithm.net>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: kernel/printk.c: increasing the buffer size to capture devfsd debug messages.
Date: Tue, 20 Feb 2001 14:05:15 -0800	[thread overview]
Message-ID: <20010220140515.C4106@tenchi.datarithm.net> (raw)
In-Reply-To: <3A92A99E.2F255CB3@yk.rim.or.jp> <20010220111542.A4106@tenchi.datarithm.net> <3A92C76C.6519DF1A@cypress.com> <20010220121727.B4106@tenchi.datarithm.net> <3A92D930.6F11B505@cypress.com>
In-Reply-To: <3A92D930.6F11B505@cypress.com>; from ted@cypress.com on Tue, Feb 20, 2001 at 02:53:04PM -0600

On Tue, Feb 20, 2001 at 02:53:04PM -0600, Thomas Dodd wrote:
> Robert Read wrote:
> 
> Why not just make the config option in Kbytes.
> and do:
> 
> #define LOG_BUF_LEN (CONFIG_PRINTK_BUF_LEN * 1024)
> 

This is good idea, but I believe LOG_BUF_LEN needs to be a power of
2.  A bitmask is used in several places to wrap around the end of the
ring buffer.  For example

#define LOG_BUF_MASK	 (LOG_BUF_LEN-1)

printk() {
  ....
  log_buf[(log_start+log_size) & LOG_BUF_MASK] = *p;
}


I think LOG_BUF_LEN could be defined to round up (or down) at compile
time, but my post-lunch-sleepy brain can't think of the trick to do
it.

robert

  parent reply	other threads:[~2001-02-20 22:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-20 17:30 kernel/printk.c: increasing the buffer size to capture devfsd debug messages Ishikawa
2001-02-20 19:15 ` Robert Read
2001-02-20 19:37   ` Thomas Dodd
2001-02-20 20:17     ` [PATCH] " Robert Read
2001-02-20 20:53       ` Thomas Dodd
2001-02-20 21:03         ` Thomas Dodd
2001-02-20 22:05         ` Robert Read [this message]
2001-02-20 22:17           ` [PATCH] configurable printk buffer size Robert Read
2001-02-20 21:27   ` kernel/printk.c: increasing the buffer size to capture devfsd debug messages Ishikawa

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=20010220140515.C4106@tenchi.datarithm.net \
    --to=rread@datarithm.net \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox