From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 D8DE618B0F for ; Wed, 14 Jan 2026 04:20:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768364404; cv=none; b=CuapMgrLvXFK6OSXcTiYt0eKgVdYgY2GnBDsV5DXVvF+nt5dR7A9vS3Fao0pK0huzqMmK3StEGX4Xnr2xR6FXFGWpeuMesY/l+vByKQnpB6vsyKEzU//GhKRHeWBKq5w7unwhffo4f8EgtNXCw8bnbHPsdWDmkjvrfl2+hGttnU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768364404; c=relaxed/simple; bh=n83bBY8oqd3Tfck17nQUd2SrthbDmQ9bSGMF4w9/bIM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kkbgLH+Aih0gq1eDkT+ZcxHikun0eSOqKKIz+X52msYBjGtoxZYzVQ/cyb82+L/3mq116oPB4Ik2JQipmhy2kDobZFlFXGovXxQ8jUoSJ2ATnfif6rnzFGA95ug1gNUdJ2tA2d2wPl6pgBwl1uw7bc4RzqEjxERJNWBt0Wm2l04= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=ee9idtSQ; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ee9idtSQ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jxeqQvnZbeUxm2rmH1In1OgW9xKfSYGFaWwGO1Z49co=; b=ee9idtSQgUTHRWt9707M2qVZni ZFAby3K+K8qceQTZAOefoQnUlPMTjqjNwV1bAP2224bg0JdLcIeTQWjeBB+A6P9B0Jz3Z1OgxueMh PmumtQUBZoLu5UmIBREUclae2XGYveWp3VECZ2+FSfZBCtolSqbzy5JUC4U0Ua+Npa5UclrTm16Ox Ta699XrmiftixI0M7ZH0VfnmDORL02NfBe9Zwyx1WzxqHDzwM6z+GVV2B3+ILWPi85OtfemuIGnQH Ibm1GkatwpwfO8n1T1Z6kk1dJ/mO6+2TI1CV5qHZ+m3GKth9YyPelI13MwzkMIkop5tjljtDFvqdV q6sSNM0g==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vfsMO-00000005fdK-2Wct; Wed, 14 Jan 2026 04:19:56 +0000 Date: Wed, 14 Jan 2026 04:19:56 +0000 From: Matthew Wilcox To: wang.yaxin@zte.com.cn Cc: akpm@linux-foundation.org, liam.howlett@oracle.com, lorenzo.stoakes@oracle.com, david@kernel.org, vbabka@suse.cz, jannh@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, xu.xin16@zte.com.cn, yang.yang29@zte.com.cn, fan.yu9@zte.com.cn, he.peilin@zte.com.cn, tu.qiang35@zte.com.cn, qiu.yutan@zte.com.cn, jiang.kun2@zte.com.cn, lu.zhongjun@zte.com.cn Subject: Re: [PATCH linux-next] mm/madvise: prefer VMA lock for MADV_REMOVE Message-ID: References: <202601141124178748cM66DJW2fzNea7Uym1mG@zte.com.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202601141124178748cM66DJW2fzNea7Uym1mG@zte.com.cn> On Wed, Jan 14, 2026 at 11:24:17AM +0800, wang.yaxin@zte.com.cn wrote: > From: Jiang Kun > > MADV_REMOVE currently runs under the process-wide mmap_read_lock() and > temporarily drops and reacquires it around filesystem hole-punching. > For single-VMA, local-mm, non-UFFD-armed ranges we can safely operate > under the finer-grained per-VMA read lock to reduce contention and lock > hold time, while preserving semantics. Oh, and do you have any performance measurements? You're introducing complexity, so it'd be good to quantify what performance we're getting in return for this complexity. A real workload would be best, but even an artificial benchmark would be better than nothing.