Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3826354rdg; Wed, 18 Oct 2023 07:13:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGlPDh2aHUYeiasvB56e7DtvDS8ph2b08T4NQBoImM0nt/57a25we72i0nw67zFfp28SMv1 X-Received: by 2002:a05:6870:1b0f:b0:1e9:d3e8:dd85 with SMTP id hl15-20020a0568701b0f00b001e9d3e8dd85mr6384494oab.17.1697638384154; Wed, 18 Oct 2023 07:13:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697638384; cv=none; d=google.com; s=arc-20160816; b=OeACoDNezq419hps5QNzlTa5+RjbBUPXN/pVW04O7ugTmp4SVBuW+0w6MKaWINNF9c qEFpcqVLYhWz60X5gGeYQkpTRqTe9t+jDZfaP1qxP9xfWJpFpKwWAox6sUGnlQqA6RsT HA8yh9W3aq0n/Ddbf149KxtIlcQKm0vlmXc+U6j7Q0pkK61Ior4unnt+pccsMfKR7+1n w9e6ATUdMKFhnK8FQlC1QdJPMp5o4Dl9+dHvRxPhJMMTLFtEhew+TmVx5qxKay+UGr1u /aaMNl/Yk3hhpCfTTameel6eV8CGz5pTUiSw9QoXQb6wxGYpnx700HftgbgzIlQLvP9k 5Ssw== 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; bh=41esCbpGOiNvuMpXdu5kkIly6/BMtC7WI0rjINadEXI=; fh=pk7jpUncC/oYY3P8aGEIppT3L2h/vHyw5+cFKny+Skk=; b=ODx38DdssbqGaYq6zQYyGW8uHgngd7OKEL5Gt0J2dD+343Mzp22UvfEkD6bfchpifN /ucOQaB+v7O+jjjFXMJZKOTBIzAc59IIRgvOw22R7YrCiMZwVdyEpKUdNC9jc3vOpJ6g vyOtFH7ObvEx/OFYdf1RlzdOKVYIZhfab6cZ10ppj9A1/QhqCkcDaE2teOhT5u623q5o v5Gn20exL6B+W6rbpRIZY5vl7IZ410/kivgUgY2wu0Nmw4OdyFaEWzkBZ9AkSuBoKRMd uyqYNfnW3u5IbwJy1w8C3+8xKC848kqpUhgMC1ubSibxmzAFEY+ibINifMoyAlZstKFe Z/yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Bvthg0jT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n4-20020a632704000000b00565cc12ee24si1013501pgn.874.2023.10.18.07.13.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 07:13:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Bvthg0jT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C81858209687; Wed, 18 Oct 2023 07:13:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344961AbjJROMi (ORCPT + 99 others); Wed, 18 Oct 2023 10:12:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235224AbjJROMN (ORCPT ); Wed, 18 Oct 2023 10:12:13 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB7D613D for ; Wed, 18 Oct 2023 07:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=41esCbpGOiNvuMpXdu5kkIly6/BMtC7WI0rjINadEXI=; b=Bvthg0jTiYmJA89rusISVNCnk6 FkTOdcN2gYyU3pDzIHF8P8VpC/HpVYFqx3DuGjYDIawfW317jAjZhhLR35rNhrh6LD1oUGlmP3cFQ DJRLa+U0VQHaU+Sty0TFWGsfy76Rsrb6Kh7AWHba3q7iT51H8vK+0JHaCMLM7DzHUUcalGO+NTeQJ yGvSh7lB9E3OY7/QZ5tDvXUq2jV5DQy/xowRGaaTEVcJETyj/W+GSlCBrwJFz9yN0ikPzExYl8SDg pmPbV/6T+Xk7hTF0wWKgzSvhqOGv2k6nQKXm0sfzKXDrBzqV984frPnrdbA3losZDx650PwaGK3tf VfJx7Trw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qt7HH-001Key-B3; Wed, 18 Oct 2023 14:12:03 +0000 Date: Wed, 18 Oct 2023 15:12:03 +0100 From: Matthew Wilcox To: Zhiguo Jiang Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com Subject: Re: [PATCH] mm: vmscan: the dirty folio unmap redundantly Message-ID: References: <20231018013004.1569-1-justinjiang@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231018013004.1569-1-justinjiang@vivo.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 18 Oct 2023 07:13:01 -0700 (PDT) On Wed, Oct 18, 2023 at 09:30:03AM +0800, Zhiguo Jiang wrote: > If the dirty folio is not reclaimed in the shrink process, it do > not need to unmap, which can save shrinking time during traversaling > the dirty folio. Don't we have to unmap it first in order to make sure that all the dirty bits from the PTEs have been transferred to the folio dirty bit?