From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29A3EC4363A for ; Tue, 27 Oct 2020 07:11:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AB3222231B for ; Tue, 27 Oct 2020 07:11:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="KJg7AB9q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB3222231B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 46AB36B006C; Tue, 27 Oct 2020 03:11:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 419ED6B006E; Tue, 27 Oct 2020 03:11:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 309966B0070; Tue, 27 Oct 2020 03:11:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0166.hostedemail.com [216.40.44.166]) by kanga.kvack.org (Postfix) with ESMTP id 0440A6B006C for ; Tue, 27 Oct 2020 03:11:21 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9A3A6824999B for ; Tue, 27 Oct 2020 07:11:21 +0000 (UTC) X-FDA: 77416834362.06.face74_3b02f1c2727a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 51F2D1003A87D for ; Tue, 27 Oct 2020 07:11:21 +0000 (UTC) X-HE-Tag: face74_3b02f1c2727a X-Filterd-Recvd-Size: 2765 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Tue, 27 Oct 2020 07:11:20 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1603782679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TIAyPb2p8Rh2k7GpnQ+U1wvxzHtS8MTGNR/Xg0UKe0w=; b=KJg7AB9quVfKq/r/7pck1uJr5k635JyDVgs+Vu5bGXyEyrQEGIw4WJHPnnxAXO6C+4z050 dXWb4HlrOGAbhKrT2IZ7MI4o8bfA/drBPtA3Z90ORjOEIWo9t0GgHp2dKNYCHddhK2zh4L kcNiE9143R+FwXOkawYlHYqbOpdlk/4= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 927F9AC83; Tue, 27 Oct 2020 07:11:19 +0000 (UTC) Date: Tue, 27 Oct 2020 08:11:18 +0100 From: Michal Hocko To: Hui Su Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm,oom_kill: fix the comment of is_dump_unreclaim_slabs() Message-ID: <20201027071118.GM20500@dhcp22.suse.cz> References: <20200926041526.GA179745@rlk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200926041526.GA179745@rlk> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat 26-09-20 12:15:26, Hui Su wrote: > fix the comment of is_dump_unreclaim_slabs(), it just check > whether nr_unreclaimable slabs amount is greater than user > memory. The original comment is meant to say when the function should be used. Your update makes the comment makes it a kerneldoc for an internal function which on its own is not very useful. It is quite clear what the function does. The intention is not clear anymore though. If you find the comment confusing, however, then I would just propose either dropping it altogether or rename it to should_dump_unreclaimable_slab. Which is quite mouthful TBH. > Signed-off-by: Hui Su > --- > mm/oom_kill.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > index e90f25d6385d..a4a47559abcd 100644 > --- a/mm/oom_kill.c > +++ b/mm/oom_kill.c > @@ -168,9 +168,9 @@ 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) > +/** > + * Check whether unreclaimable slabs amount is greater than > + * all user memory(LRU pages). > */ > static bool is_dump_unreclaim_slabs(void) > { > -- > 2.25.1 > > -- Michal Hocko SUSE Labs