All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	arjan@linux.intel.com, bp@alien8.de, jpoimboe@redhat.com,
	richard.weinberger@gmail.com
Subject: Re: [RFC][PATCH] bug: Add _ONCE logic to report_bug()
Date: Sat, 25 Feb 2017 10:18:23 +0100	[thread overview]
Message-ID: <20170225091823.GB24922@gmail.com> (raw)
In-Reply-To: <20170225081939.GZ6536@twins.programming.kicks-ass.net>


* Peter Zijlstra <peterz@infradead.org> wrote:

> 
> Josh suggested moving the _ONCE logic inside the trap handler, using a
> bit in the bug_entry::flags field, avoiding the need for the extra
> variable.

This looks interesting, as the _ONCE() methods of warning are far more 
user-friendly than WARN() spam.

> Sadly this only works for WARN_ON_ONCE(), since the others have
> printk() statements prior to triggering the trap.

Which one is problematic to convert, WARN_ONCE()?

> Still, this saves some text and data:
> 
>   text            data     bss    dec              hex    filename
>   10469505        4443448  843776 15756729         f06db9 defconfig-build/vmlinux-ud0
>   10452803        4442616  843776 15739195         f0293b defconfig-build/vmlinux-ud0-once
> 
> (Only compile tested on x86_64 so far.)

That looks pretty sweet, as various almost never triggered _ONCE() checks tend to 
disturb the generated machine code quite a bit ...

Thanks,

	Ingo

  reply	other threads:[~2017-02-25  9:19 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 13:28 [PATCH] x86: Implement __WARN using UD0 Peter Zijlstra
2017-02-23 14:09 ` Peter Zijlstra
2017-02-23 14:59   ` Peter Zijlstra
2017-02-23 15:09   ` hpa
2017-02-23 15:23     ` Peter Zijlstra
2017-02-23 15:32       ` hpa
2017-02-23 16:03         ` Borislav Petkov
2017-02-23 14:12 ` Josh Poimboeuf
2017-02-23 14:17   ` Borislav Petkov
2017-02-23 14:36   ` Peter Zijlstra
2017-02-23 14:14 ` Arjan van de Ven
2017-02-23 14:57   ` Peter Zijlstra
2017-02-24  7:43     ` Ingo Molnar
2017-02-24  8:31       ` Peter Zijlstra
2017-02-24  9:06         ` hpa
2017-02-24  9:11         ` hpa
2017-02-24  9:15           ` Ingo Molnar
2017-02-24  9:46             ` Borislav Petkov
2017-02-24  9:52               ` H. Peter Anvin
     [not found]             ` <21ac6e53-2fcd-52e9-e72d-9faf7da14d1e@zytor.com>
2017-02-24 10:41               ` Peter Zijlstra
2017-02-25 10:38                 ` Borislav Petkov
2017-02-25 17:55                   ` hpa
2017-02-25 19:38                     ` Borislav Petkov
2017-02-25 20:04                       ` hpa
2017-02-25 20:29                         ` Borislav Petkov
2017-02-24 11:16 ` [PATCH -v2] " Peter Zijlstra
2017-02-25  8:19   ` [RFC][PATCH] bug: Add _ONCE logic to report_bug() Peter Zijlstra
2017-02-25  9:18     ` Ingo Molnar [this message]
2017-02-25  9:44       ` Peter Zijlstra

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=20170225091823.GB24922@gmail.com \
    --to=mingo@kernel.org \
    --cc=arjan@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=richard.weinberger@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 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.