From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj2-f4.google.com (mail-pj2-f4.google.com [74.125.227.132]) (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 D51AF3E4C7F for ; Thu, 9 Jul 2026 08:48:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.227.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783586904; cv=none; b=Br2RocM1S84L7PlxpvoVgVZcgH3hut0ShZff+0Pr+RNVzbNjcyyt4eSlXYH0IX2GO81+qCDNjeg/HTeJK7gunh1Jcj9iZI5TIP/Fv7jUS+ukbxN1gE/TtGHkeh4/X4AHGzZPnwSQPdbW0+uR7sELVU1CZTCzoSG7jYEz6WwRag8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783586904; c=relaxed/simple; bh=iBarDBcTr9hyYznUl9ohBDfmkAbosBiFwOCPIS/fFTo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f+MK9YKr7WJNGBva4YuZMJi34/7ZPcA9Q0CmwvXyyZlKF/CWiq7AXSfIk8RrysLecHzNuSBPtzjUKvQGu7gfMTYutwanSHnlgND3/x8AfvBZP/aWNqBXXFxravPsqupO0wTRSD0JZjyCQ0qkQ4GvCGGWuTc9A7RGhrDQqr9RaW4= 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=Jl5jt+Ml; arc=none smtp.client-ip=74.125.227.132 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jl5jt+Ml" Received: by mail-pj2-f4.google.com with SMTP id 98e67ed59e1d1-381a094c43fso1076848a91.0 for ; Thu, 09 Jul 2026 01:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783586902; x=1784191702; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=iBarDBcTr9hyYznUl9ohBDfmkAbosBiFwOCPIS/fFTo=; b=Jl5jt+MlmuCsXsndTfFn0pt7Wt/4Ot/J3B7C3FWxpIqC5lpq9qE/04Xw/p3PkpZhxb sGts7uqOy9ss50tEHoC0ugjV+6Vh6wzXjYLfPGpLiPndMviulM+VcKM0x8XaoukksR8o FUI+d/VjqnATzlbHSPHiKLkaGmCLIVQCnH3w0rvzHdYupBeU+EyrSOi4YbaUtlsr9UKJ SFDzNu6YpfwlbcSgBbT46ufbL026dYrvA2nUoQAkrKa9SqRhNlLP+QkXfzsMcxB6JWz1 2Slu+KXn8m8+sjnVA3qvCgSasMETDajuob7s5t13QbKayPEvSSl8Gk8+rEEOj1da8L8g syqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783586902; x=1784191702; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=iBarDBcTr9hyYznUl9ohBDfmkAbosBiFwOCPIS/fFTo=; b=M/m+sOQUilcFeF92eZZSFsJTihVrkGN4g7O085bUMAROa+AgiN6Vyw5Vk+3Pgetkif wWPT6KTffUXwtL7wNIMy54Lla0nPemkRBBZACSa5QceCxjMKp0J9/iR+qyjfYTM7GH2+ tg4ZTmjgrsyf98cM4dO4P4U6u4NykLWCHN/bYgRoUY+esTnWCB+uLLAlnOU3MzTBJGSZ Y+KJky9uDCu52R0h7hh4Y/50X7mpObUzq+sOBo4je4yPAI8w9LNLM9qW4S+Q1O+qiHZ2 VOAXboSzSN2h0SzvpPDKrl02n2YlfEkJ4G1qd+KItVRy1obRtl2l61gamIwOItZroqpc tD9Q== X-Forwarded-Encrypted: i=1; AHgh+RqM9mPc/hVAZoR6116ZD2+RG2bAxVkvUfP8DePePQCA9soP5AfKxwlgEGS8r0zTQOe2lJ3/Y5W2DoU1G0Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yxc5xYTc8ZPSrRM190DB3EBam2lvxc0LBW0nQCgUjkxhghDgQqq os1fUK6U7IAefIksUjxYVuvrY3n0J2+uAiqJon7q+MAA6bBuS8rZ5Rfo X-Gm-Gg: AfdE7ck1RJueI9X+UDUfoDhWuiivAvmMvrcSgH+bcoCZc900t2YGs8Z85emltj6GwKi SpDrunrUgdB+SPyLt60zR6khXv4iqQANzcEsJNqEDV33gF+8T8URp+vMJtGvkdBYKqd+bya2HV9 AP7YUVFW8PeH/TlFZ7lTNOzyEkt6GbDucnWl6nlnH1yZMf6IsSjklX7Fv9VRGF+FP94GD7mb2Lv rKOlVPLbFZoyUNCWNLiUxX00utcc2ejhmF9iSpyo0Ps0Esn5tP+oob7MDZQVjugj443o6ilvSbb nnUpg+ZeMohhVgn3bVnMxe3mCmNsg1ZeFSfNerGLwb/wkAj1JqkW4t1UxUt/XtCElvvMhsOH5u1 pwwnsuMceBckodfKKDRBIgH5YWFiao89DsytU0AZ6bcAm257cwJz/rnc6GYqysWKMPHlGv9QYw5 cPkbGK3ODx3SPk3HtjqVFo+SViTVj6gWUlOC1TFqg= X-Received: by 2002:a17:90b:54cd:b0:37f:133a:3e01 with SMTP id 98e67ed59e1d1-38941101dddmr6501170a91.4.1783586902302; Thu, 09 Jul 2026 01:48:22 -0700 (PDT) Received: from zhr-ThinkStation-K.mioffice.cn ([2408:8607:1b00:8:e059:8c15:4306:9f2]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38a52238e12sm832409a91.0.2026.07.09.01.48.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 01:48:21 -0700 (PDT) From: Hongru Zhang X-Google-Original-From: Hongru Zhang To: david@kernel.org, ljs@kernel.org Cc: akpm@linux-foundation.org, baohua@kernel.org, liam@infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@suse.com, rppt@kernel.org, shakeel.butt@linux.dev, surenb@google.com, vbabka@kernel.org, willy@infradead.org, zhanghongru06@gmail.com, zhanghongru@xiaomi.com Subject: Re: [RFC PATCH v3] mm: retry page faults under per-VMA lock when mmap_lock is not required Date: Thu, 9 Jul 2026 16:47:52 +0800 Message-ID: <20260709084752.147379-1-zhanghongru@xiaomi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi David, Lorenzo,=0D =0D Thanks a lot for the detailed review.=0D =0D Yes, Barry and I discussed this offline, and I am taking over the series fr= om=0D this version, with his agreement.=0D =0D I agree that VM_FAULT_RETRY_HARD is a poor name. I will rename it to=0D something that makes the mmap_lock requirement explicit, and document the=0D semantics more clearly, including how it relates to VM_FAULT_RETRY.=0D =0D Lorenzo, I agree that the unbounded VMA-lock retry needs to be addressed. I= =0D will look into ways to bound or otherwise avoid unbounded retries under the= =0D VMA lock, and benchmark the candidate approaches.=0D =0D I will also look into deduplicating the arch fault-handler changes by addin= g=0D common helpers, so the arch code does not have to open-code this logic.=0D =0D For the retry sites, I will audit all sites that return VM_FAULT_RETRY and= =0D document the reasoning in the next version. In particular, I will look clos= ely=0D at the userfaultfd released path, do_huge_pmd_device_private(), and the=0D FAULT_FLAG_RETRY_NOWAIT case, and update the stale comments where needed.=0D =0D I will also fix the subject and make sure the next respin includes the full= =0D maintainer/reviewer list reported by get_maintainer.pl.=0D =0D Thanks,=0D Hongru=0D