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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADC1AC433F5 for ; Fri, 15 Apr 2022 01:39:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 03A706B0071; Thu, 14 Apr 2022 21:39:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F2BDF6B0073; Thu, 14 Apr 2022 21:39:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF40C6B0074; Thu, 14 Apr 2022 21:39:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id D07326B0071 for ; Thu, 14 Apr 2022 21:39:24 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 974032A77 for ; Fri, 15 Apr 2022 01:39:24 +0000 (UTC) X-FDA: 79357405848.22.634993F Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf22.hostedemail.com (Postfix) with ESMTP id 5C201C0006 for ; Fri, 15 Apr 2022 01:39:23 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Kff8S4d04zgYb6; Fri, 15 Apr 2022 09:37:28 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 15 Apr 2022 09:39:19 +0800 Subject: Re: [PATCH] mm/vmscan: fix comment for current_may_throttle To: Andrew Morton CC: , References: <20220414120202.30082-1-linmiaohe@huawei.com> <20220414134335.f58a0e13fb2083180a164c1d@linux-foundation.org> From: Miaohe Lin Message-ID: <1e551e7b-be35-94d2-05de-9d49dc538d42@huawei.com> Date: Fri, 15 Apr 2022 09:39:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20220414134335.f58a0e13fb2083180a164c1d@linux-foundation.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf22.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 5C201C0006 X-Stat-Signature: xgg4wauwfa7og9weuwj3w4fe8r5gr6cw X-HE-Tag: 1649986763-389692 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000350, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2022/4/15 4:43, Andrew Morton wrote: > On Thu, 14 Apr 2022 20:02:02 +0800 Miaohe Lin wrote: > >> Since commit 6d6435811c19 ("remove bdi_congested() and wb_congested() and >> related functions"), there is no congested backing device check anymore. >> Correct the comment accordingly. >> >> ... >> >> --- a/mm/vmscan.c >> +++ b/mm/vmscan.c >> @@ -2334,8 +2334,7 @@ static unsigned int move_pages_to_lru(struct lruvec *lruvec, >> /* >> * If a kernel thread (such as nfsd for loop-back mounts) services >> * a backing device by writing to the page cache it sets PF_LOCAL_THROTTLE. >> - * In that case we should only throttle if the backing device it is >> - * writing to is congested. In other cases it is safe to throttle. >> + * In that case we should not throttle it otherwise it is safe to do so. >> */ >> static int current_may_throttle(void) >> { > > That's a bit awkward to read. I tweaked it, and reflowed the comment > to 80 cols. > > --- a/mm/vmscan.c~mm-vmscan-fix-comment-for-current_may_throttle-fix > +++ a/mm/vmscan.c > @@ -2332,9 +2332,9 @@ static unsigned int move_pages_to_lru(st > } > > /* > - * If a kernel thread (such as nfsd for loop-back mounts) services > - * a backing device by writing to the page cache it sets PF_LOCAL_THROTTLE. > - * In that case we should not throttle it otherwise it is safe to do so. > + * If a kernel thread (such as nfsd for loop-back mounts) services a backing > + * device by writing to the page cache it sets PF_LOCAL_THROTTLE. In this case > + * we should not throttle. Otherwise it is safe to do so. > */ > static int current_may_throttle(void) > { > _ Looks better. Many thanks for doing this! :) > > . >