From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp153-171.sina.com.cn (smtp153-171.sina.com.cn [61.135.153.171]) (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 27A99C15C for ; Wed, 20 May 2026 02:05:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=61.135.153.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779242716; cv=none; b=kKzFlgF7FN9kX6LX+uSVlAA18fOXtL+X5GcRqE/Ngq3J335lS4jYXEDCd5csqHq6mrR2BvV6/sk3NcgHgswMS+WSRlB0+MhXc3FNg5NXpeWeCvG117ieTeCAE+/wI4lMoseLwilN4jC0dGZt5QxGbKHH4CpT4GIHRfXzc0TQhnY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779242716; c=relaxed/simple; bh=YDYWJa5O7+g8/aJNyGBmKPcasCJ3KSlm+HaHbmXelS8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YzT0eCL+2NMbRqIOetJMb7oKTF9/Jgn9cshgWTGQa7Sh9eTrPazSKOP6V8R3pDvDH2s440JxQ51kvh3qKAvITDEOmAW+fakjb2Ji1dK+Cv5bHd3D1i4BPL/GzEEsDx/vXSz1F1WYANDURRmNSaOmgfMgCZGHfXAIMKpFel9F0Nk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b=fyT45ff1; arc=none smtp.client-ip=61.135.153.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b="fyT45ff1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sina.com; s=201208; t=1779242709; bh=y+Dn47Ptpimf47RraMfR6SjNvaSUAttZx7qDnXD4Cvc=; h=From:Subject:Date:Message-ID; b=fyT45ff1JIE/sPav2MJZQvLczw2E1MordjkKaPPVFRhVj6Is3BYS0bB4ZGftR+xgB Ip0TDDHsq+4cvLNedfr+srhjNMtmqxGHTT/doWsLw9WNfyl3ryfn09TFJN8njoDZRi BRG/fhDVZ0tfhxGWPmW1YsEq9GF5PQDb/oNsAlck= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.62.144]) by sina.com (10.54.253.34) with ESMTP id 6A0D16C7000039FC; Wed, 20 May 2026 10:04:57 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 3482106292027 X-SMAIL-UIID: A71D656A8CB04380A569F9ADCC051F29-20260520-100457-1 From: Hillf Danton To: Matthew Wilcox Cc: "Barry Song (Xiaomi)" , akpm@linux-foundation.org, linux-mm@kvack.org, surenb@google.com, jack@suse.cz, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/5] mm: reduce mmap_lock contention and improve page fault performance Date: Wed, 20 May 2026 10:04:45 +0800 Message-ID: <20260520020446.854-1-hdanton@sina.com> In-Reply-To: References: <20260430040427.4672-1-baohua@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, 30 Apr 2026 13:37:14 +0100 Matthew Wilcox wrote: > On Thu, Apr 30, 2026 at 12:04:22PM +0800, Barry Song (Xiaomi) wrote: > > (1) If we need to wait for I/O completion, we still drop the per-VMA lock, as > > current page fault handling already does. Holding it for too long may introduce > > various priority inversion issues on mobile devices. After I/O completes, we > > retry the page fault with the per-VMA lock, rather than falling back to > > mmap_lock. > > You're going to have to do better than that. You know I hate the > additional complexity you're adding. You need to explain why my idea of > ripping out all the complexity now that we have per-VMA locks doesn't > work. > Priority inversion can not be avoided given a lock like rwsem but the light at the end of the tunnel is proxy execution. Even though I suspect it helps the vma lock, a good instance of paying the price for inventing wheel in the 2020s.