Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp316726lqp; Wed, 12 Jun 2024 02:29:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAsZY9iWmSZV0zcmK11xrITBSLDCiR/gMS4vNJRFNG1TcY3cEnv+/BroKvO6tmxRC1jkszj7trVvyvj5Wf+/n7FHbryZ9hXzR6TUlTig== X-Google-Smtp-Source: AGHT+IEFeRGujFlav7jjBYmGlIioRMaYycNYijGriIb3LKB0f4v4ojgGx5AdKkpaoHwAafkZ4Lai X-Received: by 2002:a05:622a:d4:b0:441:564e:f62 with SMTP id d75a77b69052e-4415ac64e21mr15772931cf.61.1718184578679; Wed, 12 Jun 2024 02:29:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718184578; cv=pass; d=google.com; s=arc-20160816; b=Meb/6p04L0PZeYy7H44WnIiMUG+ZuZu++wm7SNd4W+RV+czxz2MOE6SEP/lX4t22aX R27rvYkoog7HjjqjtmDKbTliN15K1jgx4fONhjDr7anLUJnt//FLgGMFdkRGXvP8ISmv nC0yLQl5ju7Tyjakpw9dj87zPQcS5m6whCe0Kx1Y69muuYXcIgVLM3Lgu2X1ENuixIz6 /RR102beY0lIHTXIcStTTcbKW011mvu8Y+7D7bPmI1Akcr8R0k3+nFeYXHhT1HQgmNMO bXKIVvYa3jPQlTi9Aj9osrUmBQ3uk1+u4FpK4jM1qtvavKTqCD57EuThCkiOE8w4TUCH JopQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=UvzU82ARd3O0HY9mewpe3B6t/gdUxhobUBIFn6ECcTE=; fh=oruzGs+goX5fTV15ILA8e8X9bCRC146hPH7SyVEdj1w=; b=0HgHCY2rtTNZpslpCxND6EtROk336iyRMBFMt99WvssLrRLMuAfKIvJYnATJd+/1o7 NrKrh8fnKtLDnrxZ7KDkMjwepdSMnu5sUe55qs4TIjRqO95hiVfi/sBS1zUGCAxGDTqK aUyJiCEFa0tWhtuTufjWamMjWlbibeFKo9HMifwNU/30GHyqoKIYxIRjf2LlyfdwEQ1o HxiyBOpRg6yoL47yRGIOxE1DT28aD4lDaYZcAEl3of05OBQcKtfKpB1ro9p3028ii+sh 4F/mW76oWgnFH67jJKDkbALSpx6Z9PGQAcJVaLQOSvKCFeu9VAXub4aZrgDVIceQdSfx DkjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=AOrJ5cGv; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-211267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211267-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-4415c45ed2asi7016131cf.499.2024.06.12.02.29.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 02:29:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=AOrJ5cGv; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-211267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211267-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 878D61C2339B for ; Wed, 12 Jun 2024 09:29:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B469716DED4; Wed, 12 Jun 2024 09:29:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="AOrJ5cGv" Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7192716D4F6 for ; Wed, 12 Jun 2024 09:29:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718184546; cv=none; b=sI9IOSdhOai7EIcSuSLEvDhWUdhWR2k88EtSm+QMkRMAUEuGgQEZch6S6weu8AfYd3UMT33MnONUnMWSf/2exqYEBIetmeO9tpVvq3cTZ/6LluV4TU5saeauaKkBdkOHbpJuYiTwCje16WrkA8K/e8Pw8OhWE9lQ3jI1qmZVoZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718184546; c=relaxed/simple; bh=GqwZyjbDTb2LW7L7RQnUs/jhE0c2peodbic9mCWJ92k=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=EyC8X1epmBLqhYjwZS+Q2yFFAXgVL69spHO92aNAo0OH+sa+S7z9gYJBm6CCYAvgTVA/Ul2K2W4KomPeZokB7QkYMNt2JJJTTmMEGCgffQFhVEG1TGFpzNsVXQGrNmUuxKRyAiw/GewoQ7yFbwe9LuV+sgf/AovPnYv5EcCjn8A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=AOrJ5cGv; arc=none smtp.client-ip=115.124.30.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1718184536; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=UvzU82ARd3O0HY9mewpe3B6t/gdUxhobUBIFn6ECcTE=; b=AOrJ5cGvHTZu6JJN0yuO8HocECn/U5Fa5twm3KxBcnPKfd9wpnKLVLTDlHB1dcOf6eQdTk9h/ehYMBIv8MA6P/7WcEX74eh6e7/z+yNHJm2povRcrvBJAAuMNLy6ZYjIB6AflUbRxqZoRyB0DjpZhW2qJLmF73d0cisqb+T/lTs= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045075189;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=15;SR=0;TI=SMTPD_---0W8KLpTr_1718184503; Received: from 30.97.56.60(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0W8KLpTr_1718184503) by smtp.aliyun-inc.com; Wed, 12 Jun 2024 17:28:54 +0800 Message-ID: Date: Wed, 12 Jun 2024 17:28:54 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 1/6] mm: memory: extend finish_fault() to support large folio To: Zi Yan Cc: akpm@linux-foundation.org, hughd@google.com, willy@infradead.org, david@redhat.com, wangkefeng.wang@huawei.com, ying.huang@intel.com, 21cnbao@gmail.com, ryan.roberts@arm.com, shy828301@gmail.com, ioworker0@gmail.com, da.gomez@samsung.com, p.raghav@samsung.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <3a190892355989d42f59cf9f2f98b94694b0d24d.1718090413.git.baolin.wang@linux.alibaba.com> From: Baolin Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/6/11 22:38, Zi Yan wrote: > On 11 Jun 2024, at 6:11, Baolin Wang wrote: > >> Add large folio mapping establishment support for finish_fault() as a >> preparation, to support multi-size THP allocation of anonymous shmem pages >> in the following patches. >> >> Keep the same behavior (per-page fault) for non-anon shmem to avoid inflating >> the RSS unintentionally, and we can discuss what size of mapping to build >> when extending mTHP to control non-anon shmem in the future. >> >> Signed-off-by: Baolin Wang >> --- >> mm/memory.c | 57 +++++++++++++++++++++++++++++++++++++++++++---------- >> 1 file changed, 47 insertions(+), 10 deletions(-) >> > LGTM. Reviewed-by: Zi Yan Thanks Zi for reviewing.