Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp860942lqs; Fri, 14 Jun 2024 07:45:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU/PUW0FJ24zXoWDqJuJHF2JAgbrno9DPqGA95guY8lFrFOKy7J263KoLo71Ryp2aE7s0w/gKjSCXTdj88rY9EEvp3JmtKCpkMxqXtB3A== X-Google-Smtp-Source: AGHT+IFFBp93FXvACmNfnkI0+Xb8JLEGLVxYqWj9e6psC0rCebsGmSqCLV7G52CocqtFjhmFYRDx X-Received: by 2002:a05:6a00:38cc:b0:704:2516:8d17 with SMTP id d2e1a72fcca58-705c93de5demr8105995b3a.8.1718376344326; Fri, 14 Jun 2024 07:45:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718376344; cv=pass; d=google.com; s=arc-20160816; b=zerH02L2Lp0MR0OxTQaRvnh56NQFRGw/EWVCXSHGRtf3Plh3e/EtPO+OEnFyjyNLyX tx7py+qtwTJPU+wbKAynsqdQ0jukZk81iNn5AHzoXUfZ3j1x42SztOdfhoZK+/Rd5/D0 lEzfoLPgSoDuR7xWZedKOFOhnciSCOIZUJJLdvrQEtOhyLjbV+MUV1MxPdoTwSs49Cz4 ZBM0Fln96F+ascSAxJkORiBMQtmhNu0zdjBGa9Qr+6xcM5H0VyomUmHLtobbWyK8Rwh1 Lc2L9AqzgDT1ySXoTyjOBwOG+g6Q8n2VNmCqTD30/ic6heIdGGh//C8hqMJ9aky+vrQD 4qsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=COgeoGHN66/htY8IBJh9awShJLxDqgPRVGYjDpSp0Z8=; fh=+AtELab9t+ZdCs8e81liVD4VaqXI6JiKqF7UPy7Qa3s=; b=IPjL8KwQFjeyxyFp4EeHutZZoHYOkHzGAnna9yKY7zwYmdhtOoLfQG8xe78xHoa7OD Pcdbv90g1tqpmRkgOJ52GfgXCcUCXNXzftNhot4jBgfrQENaaQ6sXFNhBFQxAkkTM5Bj z88gxooxiTSkjALXQIwq+5eOY95RiVSDjyPuMarbjt7rdB9rYD0yTl9GKIMYOt1AoLsK One+P/OW16KACRbbTzwnYyWKfWIaQZiGs3yYWOVeMSKa/UE3eEL01aj08w129e6Yeo/j LsPKcbbdk9Acpk2ifxaV9PTv9z3zxTAtFntv3vK2ST3EQ3bVRoWLtRw/l03KQlWevoGg OZGQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XhZLySUa; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-215043-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215043-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fedd5e8997si3517457a12.3.2024.06.14.07.45.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 07:45:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215043-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XhZLySUa; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-215043-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215043-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C90C9281A2B for ; Fri, 14 Jun 2024 14:41:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0752B10A01; Fri, 14 Jun 2024 14:41:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XhZLySUa" Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 901E017C96 for ; Fri, 14 Jun 2024 14:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718376105; cv=none; b=UKiIPK/A+zY8RB4O/haV44ZYeRKGi1O5fK54ezrpsy9CO5AYS4osUF3ON1KuGhWH2k6UZqJlLLUQVVaOtqJUZagMTrfpGs1AIrX8IHLoTXKC+yGaF6FLQYe2j7tke7EPJ2Av1AGZE+SylAjRDPeUiKD1S/5TMiO2B3PzbfD5Zu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718376105; c=relaxed/simple; bh=y9OQe3qr0Gx7VmAgMDXRnMq83su/FNL55wFDYVVmHu8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=EYDlskrVTHszlhxVCvAFGhqLGML7hdabNpdI2Gye0SLcG9UGh2z5AOxioM3ZniG2fCmWWC0vd/7IOD4a8XKLbIeva5AW7T8EUzbNn3aFt8m38nCzbm/AKJ6Xt2urQr9SvDYz6j3BeVfd2BtM34o8YDMMNSQBYrbvo+Sew7e6gjg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XhZLySUa; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-57c61165af6so2826531a12.2 for ; Fri, 14 Jun 2024 07:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718376102; x=1718980902; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=COgeoGHN66/htY8IBJh9awShJLxDqgPRVGYjDpSp0Z8=; b=XhZLySUaFgkMWQE8tOOuW6HyrFbE3oxv5k3s09gf6L+oBqXMfJfj0qu8V2UhrpEAhR pGt1JcQ3PYaL3J+4fsbWxlMJgJ01IpHVntEStS+K0TKKRZepmXNxP52GyrQQygJfPL4J FnDaJoRmQv7kijQdH4BSdEGoNwj98uuVCfAA0hyHoiwkspaszhp0+fn683oMSqciUo8I iJCmJW5N/5wBxZba2SVyiyfOOs2ZBos5PtBd6Rm83+7J9Hd2JBuq4KoGrpweYU1WTlGG qKm2wigoJJFLtHlBaRxxDDAbQY49zSAFNdC1roH3XIdHlulEshz/9lAoL308sNDkrJT5 jDFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718376102; x=1718980902; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=COgeoGHN66/htY8IBJh9awShJLxDqgPRVGYjDpSp0Z8=; b=wB/z+6+D+wKeBNWQl4aJ982C1uogHaBaFGCFgLpoxjEM1fTNuP6QLHTfqe54LxxAYZ 9cB+FbFU42F8PDr+FCeyrYY+x5R66qz30X28UO/y1RclrIb06NgIQzBRUNo+9whi3R2U xRTDaAGHiEoiynyvtpfLlzXlUqL4wffSyaVt9QXUfiROMMBrL/1i+C+z4DmR9+3a6ez7 hwGE/VTSPZ4Yc4ybA4cKxNuW9anA3uPNPgqhO3Fzw/r5aqmHKydRzmCoX98M74niIlNA z8TMEPdUnxhM6P5pctaAVdMmO6tfZ0YqBqMLXkpvyUSxKSysKMDRJb+nVkzRAMwr+dRd EUiw== X-Forwarded-Encrypted: i=1; AJvYcCUUbwReSudgoLjUNF+UITFqVv4tuSCkkSdRLc524QF6AUzS7chcYrphR7oVuwJQqMuTdRXWUlie8NQXlST+G2SR9wwki+Cf8v3Gzh+k X-Gm-Message-State: AOJu0YxCX4WjJZeflkwjsWYlMZ6VlVwrw0rnsM58n4nyniG5emewfQE1 faXn9yvSDOgs1uRmoJ8/xxazTOTGxjvoWPcMudnnvTw0sfzmcVkfwItIRjU2sOHSIIZfx16CpzE bQykVkAehrn3nPv9A/oim6mbko0w= X-Received: by 2002:a50:d59e:0:b0:57c:9d54:67d5 with SMTP id 4fb4d7f45d1cf-57cbd8f2946mr1852528a12.29.1718376101681; Fri, 14 Jun 2024 07:41:41 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240614015138.31461-1-ioworker0@gmail.com> <20240614015138.31461-3-ioworker0@gmail.com> <222F10CF-99B0-41F5-AB59-5E65F38B4AEF@nvidia.com> In-Reply-To: <222F10CF-99B0-41F5-AB59-5E65F38B4AEF@nvidia.com> From: Lance Yang Date: Fri, 14 Jun 2024 22:41:27 +0800 Message-ID: Subject: Re: [PATCH v8 2/3] mm/rmap: integrate PMD-mapped folio splitting into pagewalk loop To: Zi Yan Cc: akpm@linux-foundation.org, willy@infradead.org, sj@kernel.org, baolin.wang@linux.alibaba.com, maskray@google.com, ryan.roberts@arm.com, david@redhat.com, 21cnbao@gmail.com, mhocko@suse.com, fengwei.yin@intel.com, zokeefe@google.com, shy828301@gmail.com, xiehuan09@gmail.com, libang.li@antgroup.com, wangkefeng.wang@huawei.com, songmuchun@bytedance.com, peterx@redhat.com, minchan@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 14, 2024 at 10:26=E2=80=AFPM Zi Yan wrote: > > On 13 Jun 2024, at 21:51, Lance Yang wrote: > > > In preparation for supporting try_to_unmap_one() to unmap PMD-mapped > > folios, start the pagewalk first, then call split_huge_pmd_address() to > > split the folio. > > > > Suggested-by: David Hildenbrand > > Suggested-by: Baolin Wang > > Signed-off-by: Lance Yang > > --- > > include/linux/huge_mm.h | 6 ++++++ > > include/linux/rmap.h | 24 +++++++++++++++++++++++ > > mm/huge_memory.c | 42 +++++++++++++++++++++-------------------- > > mm/rmap.c | 21 +++++++++++++++------ > > 4 files changed, 67 insertions(+), 26 deletions(-) > > Thanks. > > Acked-by: Zi Yan Thanks for taking time to review! Lance > > -- > Best Regards, > Yan, Zi