Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp868510rdf; Tue, 21 Nov 2023 21:24:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZlhuQ50dPhYYU7L01nM3ljHIr0CoER6eQXfU175k6Sw3mAuVhMQFCpeyPOBEptKG//2cv X-Received: by 2002:a05:6a20:38a2:b0:187:604a:3add with SMTP id n34-20020a056a2038a200b00187604a3addmr1197037pzf.24.1700630659040; Tue, 21 Nov 2023 21:24:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700630659; cv=none; d=google.com; s=arc-20160816; b=AHy/Gf54SasdrYv8xqeEJ7Tdb7weqKv+wFCXt4T0GOD5aZe6Me6kamu5riMl4FUpn2 nGwNK4oa7POCdj8CCqHTkyc4pxfzjnwwdm6f1f14+DajX5VGk3bZl16E0zO0LTdBQuW/ HalTvcsA4ULGZ9lctZGBnKqB8biAf473LjbSXyqDvnH977dnEPOfEQ80yAR1FLssq2B9 EhOOv1gm0mlJVsTs87NuQd+Jp2vLL33VycUptnkjrFuBRvdYPuv7JgMg8Zcjtp8L3uJt p5GJhOzLs3otiXD4h2V7DsrzMFNnpDLJeiSBlOlAxtlSylS8OL1PZE74A5EleFqjaxlA O07Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=A897xTqXJCJOAkSNXy7RtDlxqRa8sbWyq/4+MQQL3NU=; fh=v/j7QEwtsj+94eMIzch1qbwAijHXRMR6IcasrHCGlTE=; b=vMrg0B3RcNHF9s256jmMkRAE14MjyLElbn8yfbCT83nWzMY3/5FiAsvYG8JCLhNNdl lv9etDYBrw3DvhanVaA5vE6pgWU1eqrVl3e6nIE+7XWuNSC4tBnQTPLx0dUf3SDLH3Vv qBsdzyClA29gWrTe2YvkIMzGdvwytCHLjeP/OA6ikSSukscV47byWAiQhIX2k9aC2JeI PtXv7JVnkJsZP57vDCBJsMrKfBvaVqGEtzZGs9hoyQExoOK2++P9kvK0LF5S95K36gPS oO5SoP6gAzzp/4gdYOEeVOEdoBhFHnrtqAv99iY+JdwDE4dExHcds6zTbuassKM0KX3K 1LZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IK3Ltsik; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e4-20020a17090301c400b001cc467f87f8si12383202plh.381.2023.11.21.21.24.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 21:24:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IK3Ltsik; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id F2E4980713EF; Tue, 21 Nov 2023 21:20:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233364AbjKVFUc (ORCPT + 99 others); Wed, 22 Nov 2023 00:20:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjKVFUa (ORCPT ); Wed, 22 Nov 2023 00:20:30 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19B01110 for ; Tue, 21 Nov 2023 21:20:27 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0C99C43395 for ; Wed, 22 Nov 2023 05:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700630426; bh=TBbRhfDoqJI+ymRHmhoyHUYl0HTJGIfk3dxv/NU20Ms=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IK3LtsikP1BRvwrCEda6kuTq9O8soo75WIIUOk2Fz9xXUoexs5vP6NjzjW+PhPPvA DNmXbdqCUFHGfiVSS+c0O/cu3DrW8VyOei0MpCAf8J98XFpQPrfk2yx5OohGJd7oRr z7CqSaIUtco5hW6OHfK5ZnuHK+u2k8c44bFPucZGl1SEklO4VqRy3aVcrGy5JfSqMk 7SD4fkIzzNynOylUShKy5l5/7WHJCnMqoKGISmy8qec2U5lpHQcI2IJT5hoTdmxBSV FthKfY3MFdfmRyBYFd9hbwkQuXC25YW8BmnECgbRdvV9bw8sUEzuWj991pq0CKueCH D8dCqUJqWVRVA== Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2851c0569acso2775351a91.1 for ; Tue, 21 Nov 2023 21:20:26 -0800 (PST) X-Gm-Message-State: AOJu0YyOv0weoG5bDOoBoKj3vH8eCiCH5uUYAE0tA7lx9tQUNdxPY7Ts /5v4MvibeZDlhHXEK3qyjMp1mdH4VzaApndvJ4wbPw== X-Received: by 2002:a17:90a:6349:b0:280:65ed:df9 with SMTP id v9-20020a17090a634900b0028065ed0df9mr1378521pjs.31.1700630426038; Tue, 21 Nov 2023 21:20:26 -0800 (PST) MIME-Version: 1.0 References: <20231119194740.94101-1-ryncsn@gmail.com> <20231119194740.94101-23-ryncsn@gmail.com> In-Reply-To: <20231119194740.94101-23-ryncsn@gmail.com> From: Chris Li Date: Tue, 21 Nov 2023 21:20:14 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 22/24] swap: make swap_cluster_readahead static To: Kairui Song Cc: linux-mm@kvack.org, Andrew Morton , "Huang, Ying" , David Hildenbrand , Hugh Dickins , Johannes Weiner , Matthew Wilcox , Michal Hocko , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 21:20:42 -0800 (PST) Hi Kairui, On Sun, Nov 19, 2023 at 11:49=E2=80=AFAM Kairui Song wro= te: > > From: Kairui Song > > Now there is no caller outside the same file, make it static. Seems to me too trivial/low value to justify as a standalone patch. Chris > > Signed-off-by: Kairui Song > --- > mm/swap.h | 8 -------- > mm/swap_state.c | 4 ++-- > 2 files changed, 2 insertions(+), 10 deletions(-) > > diff --git a/mm/swap.h b/mm/swap.h > index 4402970547e7..795a25df87da 100644 > --- a/mm/swap.h > +++ b/mm/swap.h > @@ -56,8 +56,6 @@ struct page *read_swap_cache_async(swp_entry_t entry, g= fp_t gfp_mask, > struct page *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, > struct mempolicy *mpol, pgoff_t ilx, > bool *new_page_allocated); > -struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t flag, > - struct mempolicy *mpol, pgoff_t ilx); > struct page *swapin_readahead(swp_entry_t entry, gfp_t flag, > struct vm_fault *vmf, enum swap_cache_resul= t *result); > struct page *swapin_page_non_fault(swp_entry_t entry, gfp_t gfp_mask, > @@ -93,12 +91,6 @@ static inline void show_swap_cache_info(void) > { > } > > -static inline struct page *swap_cluster_readahead(swp_entry_t entry, > - gfp_t gfp_mask, struct mempolicy *mpol, pgoff_t i= lx) > -{ > - return NULL; > -} > - > static inline struct page *swapin_readahead(swp_entry_t swp, gfp_t gfp_m= ask, > struct vm_fault *vmf, enum swap_cache_result *res= ult) > { > diff --git a/mm/swap_state.c b/mm/swap_state.c > index 0433a2586c6d..b377e55cb850 100644 > --- a/mm/swap_state.c > +++ b/mm/swap_state.c > @@ -627,8 +627,8 @@ static unsigned long swapin_nr_pages(unsigned long of= fset) > * are used for every page of the readahead: neighbouring pages on swap > * are fairly likely to have been swapped out from the same node. > */ > -struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_mask, > - struct mempolicy *mpol, pgoff_t ilx) > +static struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_= mask, > + struct mempolicy *mpol, pgoff_= t ilx) > { > struct page *page; > unsigned long entry_offset =3D swp_offset(entry); > -- > 2.42.0 > >