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 75E90C433EF for ; Tue, 25 Jan 2022 17:56:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7A4A16B0073; Tue, 25 Jan 2022 12:56:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 754E86B0074; Tue, 25 Jan 2022 12:56:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 61CE66B0075; Tue, 25 Jan 2022 12:56:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 521A66B0073 for ; Tue, 25 Jan 2022 12:56:15 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0FA278249980 for ; Tue, 25 Jan 2022 17:56:15 +0000 (UTC) X-FDA: 79069563510.29.A8409A9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf05.hostedemail.com (Postfix) with ESMTP id 8605B100013 for ; Tue, 25 Jan 2022 17:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643133374; h=from:from:reply-to:subject:subject: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=E6rxjsOhNxfEiaxINggrBA6x75JFuMQB6f2O2kbHXzE=; b=BXIzrEbjlwjxscJl0uWRCufAHy8cPOcPBVccwf7ZxM9Vy0E9ox0oHYavSq4U86wMexezxM dM4o3oGuxN/YBhLE+UnvweemQpjSpKvkeEvb2P56u8fG/PW0AF4914A8tsZD2yMGpp/5xl 1Tro+B8f0sLkVdYIEWP8tJhoaI95hmg= Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-376-V8tHnnWBPZmrjsK4e6S8ig-1; Tue, 25 Jan 2022 12:56:12 -0500 X-MC-Unique: V8tHnnWBPZmrjsK4e6S8ig-1 Received: by mail-oi1-f198.google.com with SMTP id s131-20020acac289000000b002c6a61fd43fso11616048oif.23 for ; Tue, 25 Jan 2022 09:56:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=E6rxjsOhNxfEiaxINggrBA6x75JFuMQB6f2O2kbHXzE=; b=oO2jIFMED2Pvm8awFY3io+8gHhiWFIbVViieEnwDIOczb38Wpeg0TVUu3wWWe+sV0+ sKcemBE79Aghtae/2PWa6UIclGfBnCdf8BRT7bMl54DhzWzQQ8lWq7B+s5Ut9NF/0mAN tmBhxWFhRxlmgwsLxEOuYD+eiAd6AFAgJyoS77lBF+k2TBGjLVa08EVtW0ZuWAi6CCLO 2HUgxt1Rk4h4QFeWcvYXwKNSyHuhQvliXeM2QbtYnfChUfSceyymAtXJuE9QdbSSifAa 1LrBMKBfNlZctcvU/+7GD6aLx20cus6chcP0MP/0ycCrv/kbsbLvPgKzSZxYNvDaDsHu tyBw== X-Gm-Message-State: AOAM530c44QHyaG0n1Oac/LVSqJP2IjK4Otkzog5smRxptV7naRZpb3I Q0ZU2MI+WaYgG0ujiBDNk311k+toiOsibRqgN0bkaX0luScWEqmEZUPyvaXeDXloYaHkmn2yAs0 7GsXX7LGqJe8= X-Received: by 2002:a4a:dd98:: with SMTP id h24mr2975788oov.73.1643133372060; Tue, 25 Jan 2022 09:56:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYU8KoqYoZGyScgfgxOyqhv/Nbcm50wK1ORJkXgLkUal4jqhtQ/iOtcNXKSPdPLYBPciII5g== X-Received: by 2002:a4a:dd98:: with SMTP id h24mr2975775oov.73.1643133371841; Tue, 25 Jan 2022 09:56:11 -0800 (PST) Received: from optiplex-fbsd (c-73-182-255-193.hsd1.nh.comcast.net. [73.182.255.193]) by smtp.gmail.com with ESMTPSA id a15sm8138436oil.13.2022.01.25.09.56.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 09:56:11 -0800 (PST) Date: Tue, 25 Jan 2022 12:56:08 -0500 From: Rafael Aquini To: Miaohe Lin Cc: akpm@linux-foundation.org, mst@redhat.com, david@redhat.com, virtualization@lists.linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/balloon_compaction: make balloon page compaction callbacks static Message-ID: References: <20220125132221.2220-1-linmiaohe@huawei.com> MIME-Version: 1.0 In-Reply-To: <20220125132221.2220-1-linmiaohe@huawei.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 8605B100013 X-Stat-Signature: gnjai66bkuibo4x68qjur3qzx4racyp1 X-Rspam-User: nil Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BXIzrEbj; spf=none (imf05.hostedemail.com: domain of aquini@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=aquini@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1643133374-792172 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000012, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jan 25, 2022 at 09:22:21PM +0800, Miaohe Lin wrote: > Since commit b1123ea6d3b3 ("mm: balloon: use general non-lru movable page > feature"), these functions are called via balloon_aops callbacks. They're > not called directly outside this file. So make them static and clean up > the relevant code. > > Signed-off-by: Miaohe Lin > --- > include/linux/balloon_compaction.h | 22 ---------------------- > mm/balloon_compaction.c | 6 +++--- > 2 files changed, 3 insertions(+), 25 deletions(-) > > diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h > index 338aa27e4773..edb7f6d41faa 100644 > --- a/include/linux/balloon_compaction.h > +++ b/include/linux/balloon_compaction.h > @@ -80,12 +80,6 @@ static inline void balloon_devinfo_init(struct balloon_dev_info *balloon) > > #ifdef CONFIG_BALLOON_COMPACTION > extern const struct address_space_operations balloon_aops; > -extern bool balloon_page_isolate(struct page *page, > - isolate_mode_t mode); > -extern void balloon_page_putback(struct page *page); > -extern int balloon_page_migrate(struct address_space *mapping, > - struct page *newpage, > - struct page *page, enum migrate_mode mode); > > /* > * balloon_page_insert - insert a page into the balloon's page list and make > @@ -155,22 +149,6 @@ static inline void balloon_page_delete(struct page *page) > list_del(&page->lru); > } > > -static inline bool balloon_page_isolate(struct page *page) > -{ > - return false; > -} > - > -static inline void balloon_page_putback(struct page *page) > -{ > - return; > -} > - > -static inline int balloon_page_migrate(struct page *newpage, > - struct page *page, enum migrate_mode mode) > -{ > - return 0; > -} > - > static inline gfp_t balloon_mapping_gfp_mask(void) > { > return GFP_HIGHUSER; > diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c > index 907fefde2572..4b8eab4b3f45 100644 > --- a/mm/balloon_compaction.c > +++ b/mm/balloon_compaction.c > @@ -203,7 +203,7 @@ EXPORT_SYMBOL_GPL(balloon_page_dequeue); > > #ifdef CONFIG_BALLOON_COMPACTION > > -bool balloon_page_isolate(struct page *page, isolate_mode_t mode) > +static bool balloon_page_isolate(struct page *page, isolate_mode_t mode) > > { > struct balloon_dev_info *b_dev_info = balloon_page_device(page); > @@ -217,7 +217,7 @@ bool balloon_page_isolate(struct page *page, isolate_mode_t mode) > return true; > } > > -void balloon_page_putback(struct page *page) > +static void balloon_page_putback(struct page *page) > { > struct balloon_dev_info *b_dev_info = balloon_page_device(page); > unsigned long flags; > @@ -230,7 +230,7 @@ void balloon_page_putback(struct page *page) > > > /* move_to_new_page() counterpart for a ballooned page */ > -int balloon_page_migrate(struct address_space *mapping, > +static int balloon_page_migrate(struct address_space *mapping, > struct page *newpage, struct page *page, > enum migrate_mode mode) > { > -- > 2.23.0 > > Acked-by: Rafael Aquini