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 X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D342C55178 for ; Fri, 6 Nov 2020 09:16:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A20F920936 for ; Fri, 6 Nov 2020 09:16:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A20F920936 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 020016B005C; Fri, 6 Nov 2020 04:16:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F13236B005D; Fri, 6 Nov 2020 04:16:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E27EC6B0068; Fri, 6 Nov 2020 04:16:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id AF3F46B005C for ; Fri, 6 Nov 2020 04:16:05 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 5148299AE for ; Fri, 6 Nov 2020 09:16:05 +0000 (UTC) X-FDA: 77453436690.03.deer08_4308d7e272d1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 2C4DF28A4E9 for ; Fri, 6 Nov 2020 09:16:05 +0000 (UTC) X-HE-Tag: deer08_4308d7e272d1 X-Filterd-Recvd-Size: 3240 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Fri, 6 Nov 2020 09:16:04 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3DB2EAF1A; Fri, 6 Nov 2020 09:16:03 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 0463B1E1312; Fri, 6 Nov 2020 10:16:03 +0100 (CET) Date: Fri, 6 Nov 2020 10:16:02 +0100 From: Jan Kara To: Yang Shi Cc: mhocko@suse.com, ziy@nvidia.com, songliubraving@fb.com, mgorman@suse.de, jack@suse.cz, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] mm: truncate_complete_page is not existed anymore Message-ID: <20201106091602.GB25479@quack2.suse.cz> References: <20201103130334.13468-1-shy828301@gmail.com> <20201103130334.13468-2-shy828301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201103130334.13468-2-shy828301@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue 03-11-20 05:03:30, Yang Shi wrote: > The commit 9f4e41f4717832e34cca153ced62b4a1d7e26c0e ("mm: refactor > truncate_complete_page()") refactored truncate_complete_page(), and it > is not existed anymore, correct the comment in vmscan and migrate to avoid > confusion. > > Signed-off-by: Yang Shi Thanks! Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > mm/migrate.c | 2 +- > mm/vmscan.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/migrate.c b/mm/migrate.c > index 5ca5842df5db..8a2e7e19e27b 100644 > --- a/mm/migrate.c > +++ b/mm/migrate.c > @@ -1106,7 +1106,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage, > * and treated as swapcache but it has no rmap yet. > * Calling try_to_unmap() against a page->mapping==NULL page will > * trigger a BUG. So handle it here. > - * 2. An orphaned page (see truncate_complete_page) might have > + * 2. An orphaned page (see truncate_cleanup_page) might have > * fs-private metadata. The page can be picked up due to memory > * offlining. Everywhere else except page reclaim, the page is > * invisible to the vm, so the page can not be migrated. So try to > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 1b8f0e059767..165cca87edc8 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1393,7 +1393,7 @@ static unsigned int shrink_page_list(struct list_head *page_list, > * > * Rarely, pages can have buffers and no ->mapping. These are > * the pages which were not successfully invalidated in > - * truncate_complete_page(). We try to drop those buffers here > + * truncate_cleanup_page(). We try to drop those buffers here > * and if that worked, and the page is no longer mapped into > * process address space (page_count == 1) it can be freed. > * Otherwise, leave the page on the LRU so it is swappable. > -- > 2.26.2 > -- Jan Kara SUSE Labs, CR