Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1206810imm; Wed, 25 Jul 2018 13:32:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcgKXhL59Ewlu4Y/BJwxx1vvHTPQyuiSnXrXyYKPPwbFzr6de6rU9owSVjFulPpJ7gG26Gg X-Received: by 2002:a63:f18:: with SMTP id e24-v6mr22129408pgl.320.1532550771266; Wed, 25 Jul 2018 13:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532550771; cv=none; d=google.com; s=arc-20160816; b=NbHPla69mYcAcErLyHnZvUyRxqfbMxT3hqVeY58zYLl7PM+1qrfMvM1kDu94UhGEzg 746hkCIBgtZCxHHoai708cFFuXKRTrLG7wleT4emdEqET/81PR3x9N1ve6rFEAElY+Zd BZg8RZ5rL3yfcMOu81jZcHA6TsCFgDRVl6RLQYLuc0l8658cagdhpoSRJdQyc3sE2Wk1 GFDKYo83tx6YrpJCBZ1+fAf8TNZ7BuNYl4EBg2L4CrEjJrloXvm8qRDt2UG2FARscCDv +fCeu05RBZ/BVFRhATLtYcPcRYlPFwO9jKshzGvkbckyxYoCw4nFiuTpiG2ovYT4kLCY ++0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:subject:cc:to:from:date:arc-authentication-results; bh=on31BetnBbIK3j/MVVwpKW66lHuWiXOoT3XzQv2U38o=; b=J713AgUISO2aLQyNVGbXZl5WeSTAmscpT9fDGsQBvfdQ/BwcZysrPhsE3FH7MNyIqa QM84OCDBNRqYSAsgxp8vB6T9j/fot/9RsjwPyWtsy9pWUL9Ho2nMIOVieie74G20jIut 4Z10k9ThtmxCQ9YLn+ot5Nuiw241fjbw8rcOBrR4iVvhrlyfMDheQcGsRKPl/bLZay0Y qJPekNSyU7MrhhQD9R8x+LX4uHAKzdtsCPcvrjX/85rPC4N5D89i2ZuafrSUGcKVAU3O hCbhwt9wHMJcJEy4TIXvz+UujBzZdaT4FMFplKa+o8FUPu6HVqvPmA/4fpIxYieLIivx 643w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19-v6si4090334pgi.388.2018.07.25.13.32.35; Wed, 25 Jul 2018 13:32:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730793AbeGYVpF (ORCPT + 99 others); Wed, 25 Jul 2018 17:45:05 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40184 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729529AbeGYVpE (ORCPT ); Wed, 25 Jul 2018 17:45:04 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6PKNtTh041394 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 2key1bjgfq-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 25 Jul 2018 16:31:45 -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 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 25 Jul 2018 16:31:39 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6PKVdZF8061322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 25 Jul 2018 20:31:39 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8D258AC059; Wed, 25 Jul 2018 16:32:22 -0400 (EDT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C3F57AC05E; Wed, 25 Jul 2018 16:32:21 -0400 (EDT) Received: from localhost (unknown [9.85.190.157]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTPS; Wed, 25 Jul 2018 16:32:21 -0400 (EDT) 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 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180725174228.Horde.-PsCOyKHj9skAHIMbqyLDg1@messagerie.si.c-s.fr> User-Agent: Mutt/1.10.0 (2018-05-17) X-TM-AS-GCONF: 00 x-cbid: 18072520-0052-0000-0000-00000313706B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009426; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01066073; UDB=6.00547681; IPR=6.00843932; MB=3.00022324; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-25 20:31:42 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072520-0053-0000-0000-00005D7D84AF Message-Id: <20180725203135.GD23643@kermit-br-ibm-com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-25_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807250213 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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