[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180725203135.GD23643@kermit-br-ibm-com>
Date: Wed, 25 Jul 2018 17:31:35 -0300
From: Murilo Opsfelder Araujo <muriloo@...ux.ibm.com>
To: LEROY Christophe <christophe.leroy@....fr>
Cc: linuxppc-dev@...ts.ozlabs.org, "Tobin C . Harding" <me@...in.cc>,
Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
Simon Guo <wei.guo.simon@...il.com>,
Paul Mackerras <paulus@...ba.org>,
Nicholas Piggin <npiggin@...il.com>,
Michael Neuling <mikey@...ling.org>,
Michael Ellerman <mpe@...erman.id.au>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
Cyril Bur <cyrilbur@...il.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Balbir Singh <bsingharora@...il.com>,
Andrew Donnellan <andrew.donnellan@....ibm.com>,
"Alastair D'Silva" <alastair@...ilva.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] powerpc/traps: Return early in show_signal_msg()
Hi, Christophe.
On Wed, Jul 25, 2018 at 05:42:28PM +0200, LEROY Christophe wrote:
> Murilo Opsfelder Araujo <muriloo@...ux.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
Powered by blists - more mailing lists