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=-4.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=no 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 2BE90C388F7 for ; Wed, 28 Oct 2020 21:53:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6015724724 for ; Wed, 28 Oct 2020 21:53:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="kZij+PrT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6015724724 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 443B76B005C; Wed, 28 Oct 2020 17:53:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3F7456B0062; Wed, 28 Oct 2020 17:53:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E5166B0068; Wed, 28 Oct 2020 17:53:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id 01EC46B005C for ; Wed, 28 Oct 2020 17:53:33 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8CDAB181AEF10 for ; Wed, 28 Oct 2020 21:53:33 +0000 (UTC) X-FDA: 77422686306.09.moon37_5b10c3a27288 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 6CDFC180AD81A for ; Wed, 28 Oct 2020 21:53:33 +0000 (UTC) X-HE-Tag: moon37_5b10c3a27288 X-Filterd-Recvd-Size: 2566 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Wed, 28 Oct 2020 21:53:32 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7CD6E246CD; Wed, 28 Oct 2020 21:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603922011; bh=w0+pxBjU+zt4O2vwvDzMt1r0M9UokpQ6mVEdgrP7ujI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kZij+PrTtTiHIS3et04LeuL1PA8cVhJV9S9ZksXTaBfbaRNDl2VI00pkPk5ti7+Gz S/z+3dLqlDaS5jtaJWlpvT2DEEfr3dBAH75BSiMjv9BWEPkXbui0LEytjdoYFdb6u2 gvB5JJmo1/1V+bjKU/Z4NpUstwN0WJMb1imPd7i8= Date: Wed, 28 Oct 2020 14:53:30 -0700 From: Andrew Morton To: Hui Su Cc: Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mm/oom_kill: remove comment and rename is_dump_unreclaim_slabs() Message-Id: <20201028145330.1cf7a32bb109ccb50d2b0dbb@linux-foundation.org> In-Reply-To: <20201028153141.GB77196@rlk> References: <20201027144529.GA3558@rlk> <20201027145814.GY20500@dhcp22.suse.cz> <20201027151156.GA4336@rlk> <20201027192322.GA20500@dhcp22.suse.cz> <20201028153141.GB77196@rlk> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 28 Oct 2020 23:31:41 +0800 Hui Su wrote: > 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. > I think your recent attempt to improve the comment: /* * Check whether unreclaimable slabs amount is greater than all user * memory(LRU pages). */ was actually somewhat useful, and worth retaining. It would be better if it explained *why* we're doing this, rather than simply "what we are doing"? It's actually quite unobvious why we're doing this!