From patchwork Wed Oct 28 15:31:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Su X-Patchwork-Id: 11862861 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 54D8714B2 for ; Wed, 28 Oct 2020 15:32:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7173D247D3 for ; Wed, 28 Oct 2020 15:32:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="qUigTwMc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7173D247D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=163.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 51F496B005C; Wed, 28 Oct 2020 11:32:03 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4CDC66B006C; Wed, 28 Oct 2020 11:32:03 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E28C6B006E; Wed, 28 Oct 2020 11:32:03 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0114.hostedemail.com [216.40.44.114]) by kanga.kvack.org (Postfix) with ESMTP id 10DD96B005C for ; Wed, 28 Oct 2020 11:32:03 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 536303620 for ; Wed, 28 Oct 2020 15:32:02 +0000 (UTC) X-FDA: 77421724884.19.color90_1e04d2127285 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 1AB6F1AD1B0 for ; Wed, 28 Oct 2020 15:32:02 +0000 (UTC) X-Spam-Summary: 1,0,0,669963be4139b8e6,d41d8cd98f00b204,sh_def@163.com,,RULES_HIT:41:355:379:582:800:960:973:988:989:1152:1260:1277:1312:1313:1314:1345:1359:1381:1437:1516:1518:1519:1534:1541:1593:1594:1595:1596:1711:1730:1747:1777:1792:2393:2559:2562:2892:3138:3139:3140:3141:3142:3151:3352:3865:3866:3867:3868:3871:3872:3874:4321:5007:6261:6653:10004:10400:10450:10455:11026:11334:11473:11658:11914:12043:12048:12114:12296:12297:12438:12555:12895:12986:13069:13191:13192:13229:13311:13357:13439:13869:13895:14096:14097:14181:14394:14721:19904:19999:21080:21451:21600:21627:21795:21886:21990:30005:30051:30054:30075,0,RBL:220.181.12.18:@163.com:.lbl8.mailshell.net-66.100.201.100 62.50.2.100;04yfdux7kjbswrjm4p539qhfraz7qopxxqdet7h8z4sxzyd3wmhsq5uwsysnrqx.newmohw6yb7m79j9u7d9rf8h4yj7kzq5wojo4ch5464e9yjex44jftuytky3csj.s-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:69, LUA_SUMM X-HE-Tag: color90_1e04d2127285 X-Filterd-Recvd-Size: 3198 Received: from m12-18.163.com (m12-18.163.com [220.181.12.18]) by imf13.hostedemail.com (Postfix) with SMTP for ; Wed, 28 Oct 2020 15:31:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version; bh=nAs3v bkCmcV6Oy/GkOcEF/dH1rSAqiDrs/rbgl/Dt0I=; b=qUigTwMcCWIF+OxcrVy8g cA8If80/dMbSNmPzz/m3D3doUZNlVPvjgjjQ5H0GD3UdmfA478UCyqGCeya3hMsk Qp2C0MLBgyL6fqzdBO00lu2V6rhv/UC79dsGVgYHkPriES2abYgQJmgeCbQOvy0T 47yZWxHAxieyMYxbCfZNZE= Received: from localhost (unknown [101.86.209.121]) by smtp14 (Coremail) with SMTP id EsCowAC314PdjplfhT2uAg--.3425S2; Wed, 28 Oct 2020 23:31:41 +0800 (CST) Date: Wed, 28 Oct 2020 23:31:41 +0800 From: Hui Su To: Michal Hocko , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, sh_def@163.com Subject: [PATCH v3] mm/oom_kill: remove comment and rename is_dump_unreclaim_slabs() Message-ID: <20201028153141.GB77196@rlk> References: <20201027144529.GA3558@rlk> <20201027145814.GY20500@dhcp22.suse.cz> <20201027151156.GA4336@rlk> <20201027192322.GA20500@dhcp22.suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201027192322.GA20500@dhcp22.suse.cz> X-CM-TRANSID: EsCowAC314PdjplfhT2uAg--.3425S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7tr18Wr4xWryrZw4DZw4rGrg_yoW8Xr1Up3 Z3t34Dtw4rtrZI9F4xCr429r1avws5KFyfJr9xKw18Zw15Xw1UurW8C342vr9IqFyrAFs3 JrWayr4kZ3WDZrDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07Uzq2_UUUUU= X-Originating-IP: [101.86.209.121] X-CM-SenderInfo: xvkbvvri6rljoofrz/1tbiMR3LX1UMWJ7UYAAAsT X-Bogosity: Ham, tests=bogofilter, spamicity=0.042190, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Comment for is_dump_unreclaim_slabs is not really clear whether it is meant to instruct how to use the function or whether it is an outdated information of the past implementation of the function. it doesn't realy help that is_dump_unreclaim_slabs is hard to grasp on its own. Rename the helper to should_dump_unreclaim_slabs which should make it clear what it is meant to do and drop the comment as the purpose should be pretty evident now. Signed-off-by: Hui Su Acked-by: Michal Hocko --- mm/oom_kill.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 8b84661a6410..d181e24d7193 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -170,11 +170,7 @@ static bool oom_unkillable_task(struct task_struct *p) return false; } -/* - * Print out unreclaimble slabs info when unreclaimable slabs amount is greater - * than all user memory (LRU pages) - */ -static bool is_dump_unreclaim_slabs(void) +static bool should_dump_unreclaim_slabs(void) { unsigned long nr_lru; @@ -463,7 +459,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p) mem_cgroup_print_oom_meminfo(oc->memcg); else { show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask); - if (is_dump_unreclaim_slabs()) + if (should_dump_unreclaim_slabs()) dump_unreclaimable_slab(); } if (sysctl_oom_dump_tasks)