Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp375714lqh; Tue, 7 May 2024 01:38:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8vrBir/APjN6U8BRC+1GHj69tTqELCtkLZikx5v6w7AgdyJaThuVFLypx2JE76NqrqIZQrp+DYFrCa8D6uKpMoAfOcqXMXu4vC323iw== X-Google-Smtp-Source: AGHT+IFEAoOhWNi1To1lSrS7771OAljELfhjvDU1ceHKCtCyTppTBoWFnmuga7j/ClpbFWUGRjQE X-Received: by 2002:ac8:7d92:0:b0:437:c49e:ece9 with SMTP id c18-20020ac87d92000000b00437c49eece9mr14968632qtd.42.1715071109014; Tue, 07 May 2024 01:38:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715071108; cv=pass; d=google.com; s=arc-20160816; b=e8ZBwq4BcUw0eiHfeYrttvSrpb9mE/RhZRaGWDoAPDrj2k/ns+o1jD3Rv9fjYogRPD ECLF/OeXUjIu0fbHJx9j/6zdQZGfwhnPcXW+rbnMZN5I/e2ugfiIaWVTlk5bfVhcY5Jz Kmb62qovLmoV5BFBngtKrDufydbclS7fq+2xUHrtRYBaQigIETih0Xj+uDMoC65ZFM5Y ro9LeUyXH73Sd4XD5ojRBk++ykt1v0jjASA6KlGVPdDCewutbUq0tFycJFIj6qhMIWsA k/7vacVa/ZJKH/HTsIBboJm8JWIFUHOYLLQNwCyii52VDN6Ftl5CcUecueSLekFu2GUk oLsg== 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=W8d/lEWlCZJQYX2qha3kS5f99rv+hpjz1wOoh2/05Gk=; fh=BCpeS7qRFg6+FUnwzC776R6umcSmsbkF5fCYuYyDiHk=; b=A7U7SkDVYw1ZpQ5UYHOFQMaifSa9OsIwP2GkYss9xBF0nHLrY9bruNTscLgcLLUKBd 0INAGWR6NPpve3qaWZtoieWjpTk+NHLM4je8nAHZA4d860wGboEm6dRrLVYw18S3uPvi /XGNz2Wxh7X6So0DSqjCj8n+p8Mjb2HNfdvxPSvce36spYUoEJuchQ0FVX6HnpV2jwIq Pg95B1N8XssKpVQkOQ9+5nnxSiFLMSmWPmnufI6QU2PAgzbrBf5QLVr3uK4nmlhPzyar CHEZCx7ficrwnYOHihJzESIO/Hds6C3d6+VGtzHNN/8tXJZ0FEwgOGHwCUEWsrUrDLNZ yrhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LPn3VOro; 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-170882-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170882-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c13-20020ac87dcd000000b0043a2b0032e0si11290957qte.252.2024.05.07.01.38.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 01:38:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170882-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LPn3VOro; 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-170882-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170882-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BA85E1C20B3E for ; Tue, 7 May 2024 08:38:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0FE9E13C9A6; Tue, 7 May 2024 08:38:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LPn3VOro" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 A9CFF13C9CF for ; Tue, 7 May 2024 08:38:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715071102; cv=none; b=R9ewpYpU62IUHsDelz8sheArjYpJBhm7YY7lZKaMItWXFkB80Vj/PF1RP449C0uAdMWy/bNmElEYEqwduancl8t54ZDbPI8ibZ4/OvMbO3neIx3GqzixCR4j7+SMnwQsipYpadYyTYTwA6yfooif8hjXi09bgAOwkWfbs60vyHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715071102; c=relaxed/simple; bh=ayJdpi2spmyDJ1bR7l+EpEo/WH4lkWBiUiptZi1GjnY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=iDhcD2STNHYJZt15jzxCuCoWItDeFJGNwdRfrvIsToz+d6HZC00hZULGvH6OWpqlo9WipgEywii0S1WkOU3swTj/3hVjaYOp6shPGR3Yf3HcE8RjTILtDO4SF793GYuug6ARwqY/EB8n7KOUAGnmoon/gfOswNvLBS6x9urEj2I= 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=LPn3VOro; arc=none smtp.client-ip=209.85.218.54 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-ej1-f54.google.com with SMTP id a640c23a62f3a-a5200afe39eso733864466b.1 for ; Tue, 07 May 2024 01:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715071099; x=1715675899; 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=W8d/lEWlCZJQYX2qha3kS5f99rv+hpjz1wOoh2/05Gk=; b=LPn3VOrold0UXhAr9bHCKtS1b4jCPT+xylRgb2pXzQ2M8VfL/cIUTZ07E1/EoWAuJy iWOE+Kg7acjJEFGUVsNf5xNpFZ9wkrGDXvyb0vpq78/UEfER/w9USgTmWsTKwTzn+E4l 1cfxt5C3p7FwZP+Vv+EHBQgURMj30RuipmB5b8Y0ou5oqgFXZl+Gxei3Amt7M5DfeA4K QBboGye5g4AOCSlrr8EIt4c4jbOMoghZS5pHHFgtsk97/V47GXw6vk5YClF40xUiKUcB KHE771JOcVVH5ifCuIvWS99l+RwKhVPZPrL8+QvwiOsG7+uAgETMdx2IUraxQT4tOWKq X8kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715071099; x=1715675899; 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=W8d/lEWlCZJQYX2qha3kS5f99rv+hpjz1wOoh2/05Gk=; b=U4hTTTnIFcl60SZxkFt9Btalgkzm6FGK4SUVNXtcsVBKgEMcjaAYDq6/sym994/3eZ Vc+74sILeWIi9DfsF3vIhQKuwfqasKyIlbRXSm/ukx5wqLcHkZCShN0pHqNcbX1lgCq7 jpYc74kefUDo026m9x/WmwbZjt69dBxEA29moSLT0h6ArVQjVJiR2cRj3DpLFGGBgUeK bR0gbrONo8+2/nRJcej0q4wbfxe4d8s2ucwtrbNeZKSVKBbFKH35bWTBlajgEDj4yzgW Yxjx+1kIVZ4pUfc1/XTlhPiO9QKMKUYLU2N9av451XiMbECTGdspSRNigCX2qy7bHEHo AHYQ== X-Forwarded-Encrypted: i=1; AJvYcCXhyF/R9+TUnpothcrjcVkpNOoy9hnhjd3SGSZ35yEUHIkj/gCXiG9VbBjsoR8lzxRZjp+QbGAYPA9yZl8UORY6iMWycxqELr5GmxT5 X-Gm-Message-State: AOJu0YzaPJyZ25jI4+c2ksvy4bOU83j3L4eTsSWDH0Io2lEJCOO30KvF J1OWq+VBWAv6xi7BlUqFJQc9HYoTokXFvLWgjM9V9eVdr2EI2FkdzinfN9T2otd6mcnY1RU9dhc +AXSbivf1ZFl21/cwpzbp0A/A/d8= X-Received: by 2002:a50:c319:0:b0:56f:e7b9:e67d with SMTP id a25-20020a50c319000000b0056fe7b9e67dmr12607642edb.12.1715071098814; Tue, 07 May 2024 01:38:18 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240501042700.83974-1-ioworker0@gmail.com> <20240501042700.83974-3-ioworker0@gmail.com> In-Reply-To: From: Lance Yang Date: Tue, 7 May 2024 16:38:07 +0800 Message-ID: Subject: Re: [PATCH v4 2/3] mm/rmap: integrate PMD-mapped folio splitting into pagewalk loop To: David Hildenbrand Cc: Baolin Wang , akpm@linux-foundation.org, willy@infradead.org, sj@kernel.org, maskray@google.com, ziy@nvidia.com, ryan.roberts@arm.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 Hey David, Thanks for reaching out! On Tue, May 7, 2024 at 4:17=E2=80=AFPM David Hildenbrand = wrote: > > >>> > >>> + if (!pvmw.pte && (flags & TTU_SPLIT_HUGE_PMD)) { > >>> + /* > >>> + * We temporarily have to drop the PTL and star= t once > >>> + * again from that now-PTE-mapped page table. > >>> + */ > >>> + split_huge_pmd_locked(vma, range.start, pvmw.pm= d, false, > >>> + folio); > >>> + pvmw.pmd =3D NULL; > >>> + spin_unlock(pvmw.ptl); > >> > >> IMO, you should also make the 'pvmw.ptl =3D NULL;' after unlocking as > >> page_vma_mapped_walk() did, in case some corner case met. > > > > Yep, I'll also set pvmw.ptl to NULL here if any corner cases arise. > > > > This series already resides in mm-stable. I asked Andrew to remove it > for now. If that doesn't work, we'll need fixup patches to address any > review feedback. I'll patiently wait Andrew's response, and then submit the next version or fixup patches accordingly. Thanks, Lance > > -- > Cheers, > > David / dhildenb >