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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC3CAC61DA4 for ; Thu, 9 Feb 2023 13:10:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229896AbjBINKi (ORCPT ); Thu, 9 Feb 2023 08:10:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229834AbjBINKg (ORCPT ); Thu, 9 Feb 2023 08:10:36 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4501D93F0; Thu, 9 Feb 2023 05:10:27 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 7BC4DCE249E; Thu, 9 Feb 2023 13:10:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACE6DC433D2; Thu, 9 Feb 2023 13:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675948222; bh=4SUmqquqGXJoK6fqr+/rMnpLfSjMEDdKWErLzFfQiqw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IbxJAcxIY5aZSy8WxcV0uALiZbcIvWCMEUPDCaMmQmTjiQVyI8lF/94iQfqQkdCZM PZdv9ca/F5KivfuWiigTuT1SG4/YCVTOKKrjerMnwjdv13ix9huD/Qek9w27t8GKxv /0flF45ld1/3Dwvmb59C8wusQ0kkPeVcdiTwazc73m56FwcDU+91btuUha2TNEBd17 sIBgdMUx69bJVjv8jLvPynF3Q0q+WWsdyDNFUw9M4nydY7VZwZ9zLcAjARLixKOl+k V9YQTg4QS7b+ll5deXaGt/mqSV2Tb1PLjcJkpxxw7BJ7Md1ZxYhttiprhhMKhtEUId DBKpdSpSELI1Q== Date: Thu, 9 Feb 2023 15:10:07 +0200 From: Mike Rapoport To: Jonathan Corbet Cc: Kuan-Ying Lee , Matthias Brugger , chinwen.chang@mediatek.com, andrew.yang@mediatek.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-mm@kvack.org Subject: Re: [PATCH] mm/doc: Replace isolate_lru_page with folio_isolate_lru Message-ID: References: <20230131062853.28449-1-Kuan-Ying.Lee@mediatek.com> <87a61wvtcs.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a61wvtcs.fsf@meer.lwn.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 02, 2023 at 11:02:11AM -0700, Jonathan Corbet wrote: > Kuan-Ying Lee writes: > > > Since we introduce folio, replace isolate_lru_page() with > > folio_isolate_lru(). > > > > Signed-off-by: Kuan-Ying Lee > > --- > > Documentation/mm/page_migration.rst | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > This seems like a good patch to copy to linux-mm - done now. > > The patch perhaps is a closer match to what's in linux-next, but it > seems that, if we're going to update this document, we should reflect > the use folios throughout? Most of the current users of migrate_pages() still use isolate_lru_page() so I think that updating page_migration.rst to folios is premature. But when we do the update it also should include the translations. > Thanks, > > jon > > > diff --git a/Documentation/mm/page_migration.rst b/Documentation/mm/page_migration.rst > > index 11493bad7112..1f8cc175d770 100644 > > --- a/Documentation/mm/page_migration.rst > > +++ b/Documentation/mm/page_migration.rst > > @@ -69,8 +69,8 @@ In kernel use of migrate_pages() > > > > Lists of pages to be migrated are generated by scanning over > > pages and moving them into lists. This is done by > > - calling isolate_lru_page(). > > - Calling isolate_lru_page() increases the references to the page > > + calling folio_isolate_lru(). > > + Calling folio_isolate_lru() increases the references to the page > > so that it cannot vanish while the page migration occurs. > > It also prevents the swapper or other scans from encountering > > the page. > > @@ -89,7 +89,7 @@ How migrate_pages() works > > > > migrate_pages() does several passes over its list of pages. A page is moved > > if all references to a page are removable at the time. The page has > > -already been removed from the LRU via isolate_lru_page() and the refcount > > +already been removed from the LRU via folio_isolate_lru() and the refcount > > is increased so that the page cannot be freed while page migration occurs. > > > > Steps: > > -- > > 2.18.0 > -- Sincerely yours, Mike.