public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: sullivan <sullivan@austin.ibm.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Event logging vs enhancing printk
Date: Wed, 10 Apr 2002 08:19:29 -0600	[thread overview]
Message-ID: <20020410081929.Q7333@austin.ibm.com> (raw)
In-Reply-To: <OF58E93BB4.1862769F-ON85256B97.0047811A@pok.ibm.com>

On Wed, Apr 10, 2002 at 07:07:46PM -0500, Mike Sullivan wrote:
> >> Right - what I'm proposing would be a generic equivalent of the
> >> local staging buffer and sprintf - basically just a little wrapper
> >> that does this for you, keeping a per task buffer somewhere.
> >
> > That still doesn't solve the race with the interrupt handlers, you'd
> > need a buffer for each irq handler and one the softirq too to make
> > printk buffered and coeherent coherent across newlines (doable but even
> > more tricky and in turn less robust and less self contained).
> 
> I was envisaging a larger buffer where the current location pointer
> simply taken by the interrupt handler, and the remaining section of
> that buffer was used for the "inner printk". Which is really just
> like a stack, so it makes more sense to just allocate this off the
> stack really .... I think this would work? We might need to flush
> on a certain size limit (128 chars, maybe?) to stop any risk of
> stack overflow.
> 
> > Some other code may omit it by mistake, leading to the other cpus
> > blackholed and data lost after the buffer on the other cpus overflowed
> > so at least we should put a timer that spawns an huge warning if a cpu
> > doesn't flush the buffer in a rasonable amount of time so we can catch
> > those places.
> 
> It seems that 99.9% of these cases are just assembling a line of output
> a few characters at a time. There might be a few odd miscreants around,
> but not enough to worry about - I think it's overkill to do the runtime
> timer check, but we could always run like this to test it, or try to
> work some sort of automated code inspection (though that sounds hard to
> do 100% reliably).

As an alternative to building a buffer and flushing, maybe it would be better ifin the case of evlog records of this type could be marked with a continuation flag. During post processing there should be enough information on the invocation location to the record to allow the recombination and viewing of the full record.

In general I think the event notification features offered by evlog offer a good platform upon which to build some very useful sysadmin tools.

> 
> M.
> 
> -
> 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/
> 
> 
> Thanks.
> Mike Sullivan
> IBM Linux Technology Center
> (512)838-0539 or t/l  678-0539

       reply	other threads:[~2002-04-10 13:16 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF58E93BB4.1862769F-ON85256B97.0047811A@pok.ibm.com>
2002-04-10 14:19 ` sullivan [this message]
     [not found] <Pine.LNX.4.33.0204111358000.20722-100000@coffee.psychology.mcmaster.ca>
2002-04-12  9:30 ` Event logging vs enhancing printk Zoltan Menyhart
2002-04-12 12:41   ` Mark Hahn
2002-04-12 14:38     ` Martin J. Bligh
2002-04-12 18:04       ` Karim Yaghmour
2002-04-10 19:43 Larry Kessler
  -- strict thread matches above, loose matches on Subject: below --
2002-04-10 17:13 Francois-Xavier Kowalski
2002-04-10 15:55 Larry Kessler
2002-04-10 13:08 Michael Holzheu
     [not found] <OF7FF94B66.91DD315B-ON88256B95.00811EF0@boulder.ibm.com>
2002-04-10  8:21 ` Zoltan Menyhart
2002-04-08 23:18 Martin J. Bligh
2002-04-08 22:38 ` Andrew Morton
2002-04-08 23:54   ` Martin J. Bligh
2002-04-08 23:07     ` Andrew Morton
2002-04-09  2:14       ` Martin J. Bligh
2002-04-10  1:23         ` Andrea Arcangeli
2002-04-10  5:28           ` Martin J. Bligh
2002-04-11  0:15             ` Andrea Arcangeli
2002-04-09 14:34     ` Bill Davidsen
2002-04-09 14:50       ` Martin J. Bligh
2002-04-09 13:24 ` Denis Vlasenko
2002-04-09 14:42   ` Martin J. Bligh
2002-04-09 18:17     ` John Alvord
2002-04-09 14:21 ` Michel Dagenais
2002-04-09 20:49   ` Brian Beattie
2002-04-09 21:16     ` Martin J. Bligh
2002-04-09 22:28       ` Brian Beattie
2002-04-10  0:29         ` Brian Beattie
2002-04-10  1:17         ` Martin J. Bligh
2002-04-10 11:24     ` Denis Vlasenko
2002-04-11 15:11     ` Michel Dagenais

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=20020410081929.Q7333@austin.ibm.com \
    --to=sullivan@austin.ibm.com \
    --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