Thread (20 messages) 20 messages, 5 authors, 2018-07-26

Re: [PATCH 2/7] powerpc/traps: Return early in show_signal_msg()

From: Murilo Opsfelder Araujo <hidden>
Date: 2018-07-25 20:31:48
Also in: lkml

Hi, Christophe.

On Wed, Jul 25, 2018 at 05:42:28PM +0200, LEROY Christophe wrote:
Murilo Opsfelder Araujo [off-list ref] a écrit :
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help