From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41bRhz6G0SzF09Y for ; Thu, 26 Jul 2018 06:31:47 +1000 (AEST) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6PKNqmj090812 for ; Wed, 25 Jul 2018 16:31:45 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2keyxegw09-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 25 Jul 2018 16:31:44 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 25 Jul 2018 16:31:43 -0400 Date: Wed, 25 Jul 2018 17:31:35 -0300 From: Murilo Opsfelder Araujo To: LEROY Christophe Cc: linuxppc-dev@lists.ozlabs.org, "Tobin C . Harding" , Sukadev Bhattiprolu , Simon Guo , Paul Mackerras , Nicholas Piggin , Michael Neuling , Michael Ellerman , "Eric W . Biederman" , Cyril Bur , Benjamin Herrenschmidt , Balbir Singh , Andrew Donnellan , "Alastair D'Silva" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/7] powerpc/traps: Return early in show_signal_msg() References: <20180724192720.32417-1-muriloo@linux.ibm.com> <20180724192720.32417-3-muriloo@linux.ibm.com> <20180725174228.Horde.-PsCOyKHj9skAHIMbqyLDg1@messagerie.si.c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <20180725174228.Horde.-PsCOyKHj9skAHIMbqyLDg1@messagerie.si.c-s.fr> Message-Id: <20180725203135.GD23643@kermit-br-ibm-com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, Christophe. On Wed, Jul 25, 2018 at 05:42:28PM +0200, LEROY Christophe wrote: > Murilo Opsfelder Araujo 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