Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1131576rwb; Fri, 13 Jan 2023 08:17:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXuPkJK3wHobQ7goePCLz1b6tqZusvD0QUFb2y3vAEueP47OaCv/l50aN2vZprStYBTRfXYR X-Received: by 2002:a17:90a:8d0d:b0:226:e0da:fcc2 with SMTP id c13-20020a17090a8d0d00b00226e0dafcc2mr26029117pjo.47.1673626626966; Fri, 13 Jan 2023 08:17:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673626626; cv=none; d=google.com; s=arc-20160816; b=j+6fLdi/+FFPTWxzEzB0CjIN8ISZm3t0pMHRhVpTIdvYEl7h6D4wPdy5BfbqBDKK3R ult0rjS1w4eKmFMPL9Gk/c5fymTg9sg6B4wRxh2o9b/RB5oQ6mH/KqVKtg7utSEuEGPJ rjVg2ofTaOpHaGtFrhpX131NjDAH4cttaf6t22/QPxWJYuELCz6ZK3zWvtAPH8lDItvV U1TMZbcGeclNbuA7bKJf/TQrb+DwTy+6Kh4+qIG4o6iEdOcTr9VTxxc+jlRLJGekhvrq RnR8jYBxI2msVMk4FxM480JDyitFK/lNTGydP2ZX2GS5UQuVBWGrmSo6CNKS+R7+WLCp 1diQ== 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=zRXwQ9oqAVYSWzO7WrEZgPVvSq/p+4hxA2jZXOARcaA=; b=q5LVMWeV6XFSwb+kufadX+8xsOkpkoSmMaVWsqzEbykUyMyt+GLu6KPIBX8FOeIM4V iEPGtcGNgJ84PioXHWw3WrXRzDefMRWo3YZWCy0H93h09963IJJ6Qa++htt6j5HW+rCx 1VsvakeIXyCSekAo28OBQeuHvNbDgzSkS/F/36d4ptegSr/RjyMeVdDHrHTKk+TQ/h5D 4Ls+t5Z4xDLCwsCZ1jesv2EcYD4v5rB0MTS5RjmbPdNqb7kdvErn/y5aSFHwuQgWMVAM /dUnZpj4BPxu7cO94MoTj2YG5rnmEtqVXHryUnzpoR66ebAgghKDDypPRq/5f6HYC/c/ d7Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=IKHZjnz4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi13-20020a17090b1e4d00b0020d5867aab6si22290087pjb.141.2023.01.13.08.17.00; Fri, 13 Jan 2023 08:17:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=IKHZjnz4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230274AbjAMPmS (ORCPT + 51 others); Fri, 13 Jan 2023 10:42:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230251AbjAMPli (ORCPT ); Fri, 13 Jan 2023 10:41:38 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F09397D261 for ; Fri, 13 Jan 2023 07:33:14 -0800 (PST) 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=zRXwQ9oqAVYSWzO7WrEZgPVvSq/p+4hxA2jZXOARcaA=; b=IKHZjnz4pPCOfgTft+0liESi2f kKsDMVi9+ddi0BQxyoKLBdrKMKLTpQ3UFyYHdysj91Vidl0LsX6Vtc9cvXCV7v4NvXCp8KDGmzdOp xeokBIMpny4z6sCyjZlabpSSos0apHc5VCgr7VUsya6qepDL8kN1H26sQnSjDZ6eCrm1XC9AW96t+ n/eqEysqbghxeJhivzSZuCaVoVatsTv7HCVrx4iSeBnBtJhaaCUuB6kQbB9jGl6vE3inaQziDKi5U NSQKzgKntPuWHy7ScL/fEaQskGlqAksBg0FBVqfarlEyXsStguWuw8fwqGsi183l+3QS1IPuBjNSG YZmtB/bw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGM3O-006Cyp-EH; Fri, 13 Jan 2023 15:33:14 +0000 Date: Fri, 13 Jan 2023 15:33:14 +0000 From: Matthew Wilcox To: Kefeng Wang Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next 2/7] mm: memory: convert do_anonymous_page() to use a folio Message-ID: References: <20230112083006.163393-1-wangkefeng.wang@huawei.com> <20230112083006.163393-3-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230112083006.163393-3-wangkefeng.wang@huawei.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 Thu, Jan 12, 2023 at 04:30:01PM +0800, Kefeng Wang wrote: > Convert do_anonymous_page() to use a folio and replace related functions > to folio functions. I think this patch has a prerequisite of sorting out alloc_zeroed_user_highpage_movable(). That way we can get rid of the 'page' variable inside this function altogether. > inc_mm_counter(vma->vm_mm, MM_ANONPAGES); > page_add_new_anon_rmap(page, vma, vmf->address); folio_add_new_anon-rmap(). > - lru_cache_add_inactive_or_unevictable(page, vma); > + folio_add_lru_vma(folio, vma);