public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Murilo Opsfelder Araujo <muriloo@linux•ibm.com>
To: LEROY Christophe <christophe.leroy@c-s•fr>
Cc: linuxppc-dev@lists•ozlabs.org, "Tobin C . Harding" <me@tobin•cc>,
	Sukadev Bhattiprolu <sukadev@linux•vnet.ibm.com>,
	Simon Guo <wei.guo.simon@gmail•com>,
	Paul Mackerras <paulus@samba•org>,
	Nicholas Piggin <npiggin@gmail•com>,
	Michael Neuling <mikey@neuling•org>,
	Michael Ellerman <mpe@ellerman•id.au>,
	"Eric W . Biederman" <ebiederm@xmission•com>,
	Cyril Bur <cyrilbur@gmail•com>,
	Benjamin Herrenschmidt <benh@kernel•crashing.org>,
	Balbir Singh <bsingharora@gmail•com>,
	Andrew Donnellan <andrew.donnellan@au1•ibm.com>,
	"Alastair D'Silva" <alastair@d-silva•org>,
	linux-kernel@vger•kernel.org
Subject: Re: [PATCH 2/7] powerpc/traps: Return early in show_signal_msg()
Date: Wed, 25 Jul 2018 17:31:35 -0300	[thread overview]
Message-ID: <20180725203135.GD23643@kermit-br-ibm-com> (raw)
In-Reply-To: <20180725174228.Horde.-PsCOyKHj9skAHIMbqyLDg1@messagerie.si.c-s.fr>

Hi, Christophe.

On Wed, Jul 25, 2018 at 05:42:28PM +0200, LEROY Christophe wrote:
> Murilo Opsfelder Araujo <muriloo@linux•ibm.com> a écrit :
> 
> > Modify logic of show_signal_msg() to return early, if possible.  Replace
> > printk_ratelimited() by printk() and a default rate limit burst to limit
> > displaying unhandled signals messages.
> 
> Can you explain more the benefits of this change ?

Mainly is to improve readability of the function.

The conditions to display the message were coupled together in one
single `if` statement.

Besides that, patch 5/7 adds a call to print_vma_addr(), which is not
aware of any rate limit - it simply calls printk().

So splitting out the rate limit check outside show_signal_msg() makes it
easier to the caller decide if it wants to respect a printk rate limit
or not.

Cheers
Murilo

  reply	other threads:[~2018-07-25 20:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 19:27 [PATCH 0/7] powerpc: Modernize unhandled signals message Murilo Opsfelder Araujo
2018-07-24 19:27 ` [PATCH 1/7] powerpc/traps: Print unhandled signals in a separate function Murilo Opsfelder Araujo
2018-07-24 19:27 ` [PATCH 2/7] powerpc/traps: Return early in show_signal_msg() Murilo Opsfelder Araujo
2018-07-25 15:42   ` LEROY Christophe
2018-07-25 20:31     ` Murilo Opsfelder Araujo [this message]
2018-07-24 19:27 ` [PATCH 3/7] powerpc/reg: Add REG_FMT definition Murilo Opsfelder Araujo
2018-07-24 19:27 ` [PATCH 4/7] powerpc/traps: Use REG_FMT in show_signal_msg() Murilo Opsfelder Araujo
2018-07-24 19:27 ` [PATCH 5/7] powerpc/traps: Print VMA for unhandled signals Murilo Opsfelder Araujo
2018-07-24 19:27 ` [PATCH 6/7] powerpc/traps: Print signal name " Murilo Opsfelder Araujo
2018-07-25 15:19   ` Gustavo Romero
2018-07-25 19:41     ` Murilo Opsfelder Araujo
2018-07-25 15:49   ` LEROY Christophe
2018-07-25 20:06     ` Murilo Opsfelder Araujo
2018-07-24 19:27 ` [PATCH 7/7] powerpc/traps: Show instructions on exceptions Murilo Opsfelder Araujo
2018-07-25 16:01   ` LEROY Christophe
2018-07-25 20:51     ` Murilo Opsfelder Araujo
2018-07-25  7:00 ` [PATCH 0/7] powerpc: Modernize unhandled signals message Michael Neuling
2018-07-25 19:36   ` Murilo Opsfelder Araujo
2018-07-26  2:11     ` Michael Neuling
2018-07-26  2:20     ` Michael Ellerman

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=20180725203135.GD23643@kermit-br-ibm-com \
    --to=muriloo@linux$(echo .)ibm.com \
    --cc=alastair@d-silva$(echo .)org \
    --cc=andrew.donnellan@au1$(echo .)ibm.com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=bsingharora@gmail$(echo .)com \
    --cc=christophe.leroy@c-s$(echo .)fr \
    --cc=cyrilbur@gmail$(echo .)com \
    --cc=ebiederm@xmission$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=me@tobin$(echo .)cc \
    --cc=mikey@neuling$(echo .)org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=npiggin@gmail$(echo .)com \
    --cc=paulus@samba$(echo .)org \
    --cc=sukadev@linux$(echo .)vnet.ibm.com \
    --cc=wei.guo.simon@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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