Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp324108iob; Wed, 18 May 2022 03:04:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyH9qBFGpXgngzwEBPUJEzk6nz2qGv8ee1CMKN9XvjvomD+jnMRJrgppr9jomwrdFanJy3L X-Received: by 2002:a05:6a00:2310:b0:4fa:7eb1:e855 with SMTP id h16-20020a056a00231000b004fa7eb1e855mr27476736pfh.14.1652868241376; Wed, 18 May 2022 03:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652868241; cv=none; d=google.com; s=arc-20160816; b=cp0YlWI2x+bQZurciB0Bn0LlJYNd/GWwhk3MiAiYNqaYSgnyu082bTdJNlGDyVzmKk gce0+hO68CyUvcD3Y1eP/NYjCFDJZX8PKPsiVZ/scj9at+5TnhLDoGQUZGnOX6gx909N xBTGKQsiOx9O6BEHnHkbEEQ9VN3mDkcCTnuu9EfmQQ0/SgbHgtkXXraJ24bvruxSaXUe qP+r9hkR9DdBO0tn28DJWISfh1nIHmCfz1HQCjjY7+5P1YUH8OzSkciQ7xFOGVabO9we Srpxx4zwusW6kHnUxGbWt7n2pSec1jG9xgBIXnMrGiJ1acKEZ3Z9s8s5DRIRoQ2HFUrw AwYQ== 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 :dkim-signature; bh=UZiL2iT23ofTS/HVXmTv3k1ijrjRXrReMfjhRCC71q4=; b=qdw36rDK/X8cMAnOepq9MwqHtLdPFI5bRnjsE3YIAX6P/o3k4kQex9nyHpZMjSHd50 aFijR2YUvq1oD1CEtepAh4Mu71kPWCOsm8o90VjHd0Qb8CVkBK69H8ZkIRilpk7mCX/I Z97hL3TTL4Hite2v+VwGlP0pGltrVUd2uybmxhi4fC8fZeh5FmCpV8qujXIkvBl8aNdS Npc6QNF3bbJO6rhzbJB3hHhYOtyl0gI7F8NtvW59HwZvFUOwUj3Kb9KJODNWsMjtF4XQ 5bjyPLJtx7Rt3OBYG6ISZJLwbvVmQ9sf6wNAp9nn4NtpdbFe1y4/g0p1pqEhuwnel7sO U9mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gJipXj5l; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=MlLhLrcp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w8-20020a056a0014c800b0050cfca6a183si2841743pfu.114.2022.05.18.03.04.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 03:04:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gJipXj5l; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=MlLhLrcp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76CC214FC94; Wed, 18 May 2022 02:48:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234580AbiERJrz (ORCPT + 99 others); Wed, 18 May 2022 05:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234904AbiERJqT (ORCPT ); Wed, 18 May 2022 05:46:19 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5062B29B for ; Wed, 18 May 2022 02:46:09 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E84AE2187D; Wed, 18 May 2022 09:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1652867165; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UZiL2iT23ofTS/HVXmTv3k1ijrjRXrReMfjhRCC71q4=; b=gJipXj5lDe/gSgpXQvCeFxkBHzYwCgb7e0R6rDQphJXFAe5U2yjgxyEzkYaUkOEZugnCvn B5Qwt0RYl3ldokm5KKrZvX3ULSkbbcO8ocSxYbK4mhvjrGAHHyxEirI/NG13XC4DwygfEL Pk5OWsot6Ip97IfKoto8c8yskdTOtSg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1652867165; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UZiL2iT23ofTS/HVXmTv3k1ijrjRXrReMfjhRCC71q4=; b=MlLhLrcp9eSx/ih9hGRG9t5yHHnm5bbU0Auvo4oC5P/Tk0ZfXA3WQWQ8Cm52Sjs83KbbHP Hh+wlaQn+/WblBBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D4B30133F5; Wed, 18 May 2022 09:46:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OgfmMFzAhGJjFwAAMHmgww (envelope-from ); Wed, 18 May 2022 09:46:04 +0000 Date: Wed, 18 May 2022 11:46:02 +0200 From: Oscar Salvador To: Miaohe Lin Cc: akpm@linux-foundation.org, willy@infradead.org, vbabka@suse.cz, dhowells@redhat.com, neilb@suse.de, apopple@nvidia.com, david@redhat.com, surenb@google.com, peterx@redhat.com, naoya.horiguchi@nec.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 08/15] mm/swap: make page_swapcount and __lru_add_drain_all Message-ID: References: <20220509131416.17553-1-linmiaohe@huawei.com> <20220509131416.17553-9-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220509131416.17553-9-linmiaohe@huawei.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, May 09, 2022 at 09:14:09PM +0800, Miaohe Lin wrote: > Make page_swapcount and __lru_add_drain_all static. They are only used > within the file now. > > Signed-off-by: Miaohe Lin I think the commit message is missing the "static" word. Reviewed-by: Oscar Salvador > --- > include/linux/swap.h | 7 ------- > mm/swap.c | 2 +- > mm/swapfile.c | 2 +- > 3 files changed, 2 insertions(+), 9 deletions(-) > > diff --git a/include/linux/swap.h b/include/linux/swap.h > index 999c7d79c2d5..8772132d21dc 100644 > --- a/include/linux/swap.h > +++ b/include/linux/swap.h > @@ -490,7 +490,6 @@ int swap_type_of(dev_t device, sector_t offset); > int find_first_swap(dev_t *device); > extern unsigned int count_swap_pages(int, int); > extern sector_t swapdev_block(int, pgoff_t); > -extern int page_swapcount(struct page *); > extern int __swap_count(swp_entry_t entry); > extern int __swp_swapcount(swp_entry_t entry); > extern int swp_swapcount(swp_entry_t entry); > @@ -562,12 +561,6 @@ static inline void put_swap_page(struct page *page, swp_entry_t swp) > { > } > > - > -static inline int page_swapcount(struct page *page) > -{ > - return 0; > -} > - > static inline int __swap_count(swp_entry_t entry) > { > return 0; > diff --git a/mm/swap.c b/mm/swap.c > index 7e320ec08c6a..6d2c37f781f8 100644 > --- a/mm/swap.c > +++ b/mm/swap.c > @@ -748,7 +748,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) > * Calling this function with cpu hotplug locks held can actually lead > * to obscure indirect dependencies via WQ context. > */ > -inline void __lru_add_drain_all(bool force_all_cpus) > +static inline void __lru_add_drain_all(bool force_all_cpus) > { > /* > * lru_drain_gen - Global pages generation number > diff --git a/mm/swapfile.c b/mm/swapfile.c > index 7b4c99ca2aea..133e03fea104 100644 > --- a/mm/swapfile.c > +++ b/mm/swapfile.c > @@ -1430,7 +1430,7 @@ void swapcache_free_entries(swp_entry_t *entries, int n) > * This does not give an exact answer when swap count is continued, > * but does include the high COUNT_CONTINUED flag to allow for that. > */ > -int page_swapcount(struct page *page) > +static int page_swapcount(struct page *page) > { > int count = 0; > struct swap_info_struct *p; > -- > 2.23.0 > > -- Oscar Salvador SUSE Labs