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 6DD903A1E6B for ; Fri, 6 Feb 2026 15:22:09 +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=1770391331; cv=none; b=jmaHc0z+vTYSHmpHfszipk3KKuHYC5DEQ3Ht+2nsMUH3r0NCsCckb6AfemTgTxkbxWU0TaYC+SsfiRYyrq02+BzmFscwpIbHhK4bUvo7jW8pNOtTqbNtaUFQ9vzA3JB0UrI4PpG5JRkRz9M3ZXosFFcQ84itC9u/sKUPBZrxrkI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770391331; c=relaxed/simple; bh=Bk9oIVnWSg7mI5VPGv127NhERhRUNqZRS1s8kg88lKY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SJuFR7PbkNjnN31QCgha7tNh8sg2l2Et+2Q+3fhwIAfbzZr3ojBIeTpYb8Cd5TbqdnrFIX4triafPWQIv2Gce3wGCxhpfdRt87zv7LKunE+iCNs3DCKJvJC12EwRJiotPspkp2DpldjjxKCQgfahD/LunWz3HZCzOQ1bzhgMmc4= 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=UBvhRd28; 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="UBvhRd28" 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=T2Sx14Efw2MdrqSrFAtZIkeoX+ECvkhMa4elHhdmrE0=; b=UBvhRd2894gn4ox1l1tketHFhB 1rOGXbMLhqnMkMP+qO8Vn9bvvF7tSPTcvTCLgnvzwFucX5BocZzuEMtFJKGDW/bR099kBUGpl5Dty A1mrXBaGatZ1B1PlDxWJc1ioh2BJL2C44bVRR94BosfvJZ/8Xz5xwJ1BoYbR1/xIPVLWduMDMutVd Lqh84SGndiF+1lzoOx4Y1gRzvKYlz1j+WKvygwgYMjVqedT2nVewK+E8xHDH8qBSEpIdm21Za2PKO OFxMULlhW7MMTuYUwa49mlCsb9uOZwxexxsDLJoTbkR8Lrv6sAJKI0M/ZQSYGEeeKeKuzvsvhxShW MoMOLDrg==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1voNek-00000005OXd-32Ae; Fri, 06 Feb 2026 15:22:02 +0000 Date: Fri, 6 Feb 2026 15:22:02 +0000 From: Matthew Wilcox To: Dev Jain Cc: akpm@linux-foundation.org, david@kernel.org, lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com, vbabka@suse.cz, rppt@kernel.org, surenb@google.com, mhocko@suse.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ryan.roberts@arm.com, anshuman.khandual@arm.com, kirill@shutemov.name Subject: Re: [PATCH] mm: map maximum pages possible in finish_fault Message-ID: References: <20260206135648.38164-1-dev.jain@arm.com> 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: <20260206135648.38164-1-dev.jain@arm.com> On Fri, Feb 06, 2026 at 07:26:48PM +0530, Dev Jain wrote: > We test the patch with the following userspace program. A shmem VMA of > 2M is created, and faulted in, with sysfs setting > hugepages-2048k/shmem_enabled = always, so that the pagecache is populated > with a 2M folio. Then, a 64K VMA is created, and we fault on each page. > Then, we do MADV_DONTNEED to zap the pagetable, so that we can fault again > in the next iteration. We measure the accumulated time taken during > faulting the VMA. > > On arm64, > > without patch: > Total time taken by inner loop: 4701721766 ns > > with patch: > Total time taken by inner loop: 516043507 ns > > giving a 9x improvement. It's nice that you can construct a test-case that shows improvement, but is there any real workload that benefits from this?