Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1143900rwb; Fri, 13 Jan 2023 08:25:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXv51JHMY9g6fZZoaK5a0pMHWjALTaAfNOvGg8s2XwippzQoHPkJ6iRqHSN388h0IWs/PAbc X-Received: by 2002:a17:90a:bc8:b0:219:967c:95c3 with SMTP id x8-20020a17090a0bc800b00219967c95c3mr82328828pjd.1.1673627154598; Fri, 13 Jan 2023 08:25:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673627154; cv=none; d=google.com; s=arc-20160816; b=DgktuZQtAkAKJGLBRNNtCg5y+1tbpNXcjQwC8U9+dc5iCcOBxKangIDiSkMl6vBRQ/ SYi281Edz8+STIFqCW2hR+jj26VfkxpgALCSxNqaFOgYVDIjETKixDr0BKO2m1aqOxMa lONGZe5Age36wHFkCeUF+07BTzCY7aJGSMTyJtMCfKgKSuzXjsqtL1D4BNCUf2nqcoa/ 8RWqwPMiUATb4+WcuwADDCWPmMQC4+49wuWaIrGQYEB0IJq8yC488I1zVhTPQ0+t0ecP rDnG6W1nrTs+GqkdgmlZYCmArz7CKMvGN8oDzjDbfEr3TPXESHiTVBHkmjzV/ewBWEfr mm3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DfT9q9lHXCcgDHj3l3lHi+8c/GVJ6aWRtQZ+lLWf7NY=; b=zZnl3orU+P/htfjRWZOiTe0NsiNOzPdwGFexfpYYTQh7ir8jqOS5UUJLMbd3peHzBs zTEYEH2Zjz34jpab92Hg+rLpvDNxlrk+Y+2al5LSupklXN+N9rc3WYATtyD6spiBBT77 MIfiYDl6pOgyaX/3jaQMeEHbaAbU4m0MfQujzS35lBaK0cZ6VDKTPb+xFPERGCra65jB CHd7Uer8wAfm/C75QbBhwDihiW9aHdEODt2hy70Boz/Qh3ai1psB0umt4YKSvZRJQKK3 Xv+iRvkNbpd3qyFe2F6bocLtYb8R67VdS2RDaFtjA7fIIHBIeGlZYjTtuuVZ6TlZw6DF W8Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=X9t2JmdQ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob15-20020a17090b390f00b002290cb1ca2csi4741221pjb.177.2023.01.13.08.25.48; Fri, 13 Jan 2023 08:25:54 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=X9t2JmdQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230051AbjAMP7U (ORCPT + 51 others); Fri, 13 Jan 2023 10:59:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230321AbjAMP6S (ORCPT ); Fri, 13 Jan 2023 10:58:18 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2523F4D4A6 for ; Fri, 13 Jan 2023 07:49:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=DfT9q9lHXCcgDHj3l3lHi+8c/GVJ6aWRtQZ+lLWf7NY=; b=X9t2JmdQaeUH4e+OTEXdJApJ2c H8l5getZ8VtJbbGhMqAZHqAUgILjmF2UCOp40bGNbTiMVSmPn6pNzXaY+sHTHHQRMeiOXEiHHfrX8 SL1zzfDhfX8AWeh5yJnhIbLPqmjTi7e/Pd+VnmrGK8iV3usDOqP0OtrZLqk3scBdv1vxrbv1vizif kK9cu8Ty8sywVbbaTx1xZjWfrrbdsLGWmj2rFGxW1Xa4tSq3W0gEZsrzm4n379gkUKanC2A+NLCZl OEHVCMVVTtQQCOtoKDPyRCEe/lwZbOupiMMO3iHDsDjnK5YR56tkTJtAwEh34m1ux6/sJROJLvStu n2GneenA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGMJg-006DgR-BH; Fri, 13 Jan 2023 15:50:04 +0000 Date: Fri, 13 Jan 2023 15:50:04 +0000 From: Matthew Wilcox To: Kefeng Wang Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next 7/7] mm: swap: remove unneeded cgroup_throttle_swaprate() Message-ID: References: <20230112083006.163393-1-wangkefeng.wang@huawei.com> <20230112083006.163393-8-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230112083006.163393-8-wangkefeng.wang@huawei.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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 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()? > +extern void __cgroup_throttle_swaprate(struct folio *folio, gfp_t gfp_mask); Also you can drop the 'extern'. > +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'.