Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3120402rwb; Mon, 16 Jan 2023 04:05:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXvqxoRSgjVLnNrluNoruBPAMFxcksYCGncL9fAmyW3BShwKoHdQy44mnXBpZLxBO7fZa4zd X-Received: by 2002:a05:6402:685:b0:470:25cf:99d1 with SMTP id f5-20020a056402068500b0047025cf99d1mr78001078edy.31.1673870738152; Mon, 16 Jan 2023 04:05:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673870738; cv=none; d=google.com; s=arc-20160816; b=0KkwdcUlrXuPjJCYtZhFRfJGKGKIa9KzMv3KeVRuFIiMJnHtxFMZqH6q5OePHmzXX4 /gVCv7R54nf6teIl9hhoyqLEbn2U8DFZqYwGTs8titqujzatBzk5HcKzhBGv7vViKKLJ A+W6O4wIe0OoL3QKAIY+ZxlyVSU36FT4eDeayfinelL+9TrtxEfbKcww3FwmU4orJduO 0vqkw6PN5j3JJ9iIbohO7zXT7mBmzjqFoi5X4u6yqYt7sh1ZNe6yCPIHaaK1D+w8dN/o m009LStK8rOCgi2I7aDkBa4NAc7TSqfhVYJwv+OJOI2BiaYtBMbo0UiwaDkD90AnM72B x+Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=lFjgpE9pJFUIcd83UHKLIysa12cBr+MKTfeqNKk8Ovs=; b=yQtEBRtIYPW7PAuxgkJvPBbqN2fDiP/Y53WBKBdEYkrjitK90bBbkhZ851OI6PTVNz paup07BOR3ZghJPOko+1elGVhjc991Ym6l3wQTxUvJ9SM00hV2bYJCS+FtHq/RxhLYUq kmsoaYSsVcbCGz13iX9MEeO0T6j6e0uaSeChkNs07OeZaR3rLy+EZwJljhVHIKN8ovKM 4r2s4ewXtxzN1oqHIJ16wvw9lseGbJL9rmK/3psLbyjcIdD5sjSW6zDh1zNYDa+oX99w 7UDV7McaEvSzQCL83Li0pP4q010vA2ESB/ZKeLhWKdSAwCJ+E+PGJZePw4eaA9WFLX60 t6OQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p18-20020a056402045200b0046fdd119a4esi27885764edw.529.2023.01.16.04.05.25; Mon, 16 Jan 2023 04:05:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229648AbjAPLho (ORCPT + 51 others); Mon, 16 Jan 2023 06:37:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjAPLhm (ORCPT ); Mon, 16 Jan 2023 06:37:42 -0500 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C74EA3A9F for ; Mon, 16 Jan 2023 03:37:41 -0800 (PST) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4NwVJj35N8zJqkv; Mon, 16 Jan 2023 19:33:25 +0800 (CST) Received: from [10.174.177.243] (10.174.177.243) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 16 Jan 2023 19:37:37 +0800 Message-ID: <715cfcd3-47c3-f7f4-7dd1-4d76c6b147f8@huawei.com> Date: Mon, 16 Jan 2023 19:37:37 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH -next 7/7] mm: swap: remove unneeded cgroup_throttle_swaprate() Content-Language: en-US To: Matthew Wilcox CC: , , References: <20230112083006.163393-1-wangkefeng.wang@huawei.com> <20230112083006.163393-8-wangkefeng.wang@huawei.com> From: Kefeng Wang In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthew, On 2023/1/13 23:50, Matthew Wilcox wrote: > On Thu, Jan 12, 2023 at 04:30:06PM +0800, Kefeng Wang wrote: >> All the callers of cgroup_throttle_swaprate() are converted to >> folio_throttle_swaprate(), so make __cgroup_throttle_swaprate() >> to take a folio, and drop unused cgroup_throttle_swaprate(). > > Shouldn't __cgroup_throttle_swaprate() then be called > __folio_throttle_swaprate()? Sure. > >> +extern void __cgroup_throttle_swaprate(struct folio *folio, gfp_t gfp_mask); > > Also you can drop the 'extern'. Ok. > >> +static inline void folio_throttle_swaprate(struct folio *folio, gfp_t gfp_mask) > > And it's not a gfp mask. It's gfp_flags (we have this mistake all > through the mm). Or you can just call it 'gfp'. > > Thanks for your kindly review and advise, will update.