From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6A025217659 for ; Sat, 22 Aug 2026 14:29:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787408994; cv=none; b=r3acJREJxNKsWRycDCZK69FN6daMUIYQchHXzaEa9ajSg4rhQVd2tbICBCmkfILXEb7dafUFju0oQ/1p09YQxao2C2k7NhLIcbctSPs3uNVCdd1q5gTyjALgX8poR4Pl4GZVXTh82vc+PddPV7naY6oPpMFPX+Iby40DIMO1fIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787408994; c=relaxed/simple; bh=bEySDVU6I9t1wo1EaUhLoIaw/qeGe+Bck9/DUQcETa8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=C0Lu2afrBIg3qB4s9EYL7asxiF7cJ2ZJg/KJbjjUixW/05zTvG89oB01S+oLZ70UCinllJ+VTDP+zgljSPV0D0rdwlPV970ppNuNiNk0keEG7N1Al1tBzS7anF75H2E9KJdcmNKN+QksZIZAAmFndQPilKBbthnj5nOS2RwBtUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LdYxZ8St; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LdYxZ8St" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D235C1F000E9; Sat, 22 Aug 2026 14:29:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787408993; bh=gq2M4Yp4LsrAbxCcb4OsdXRCxH2vxgvtkfvBcPe7rk4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=LdYxZ8StMjABIcT7GtcCWMLOJqwH1cWscypDLzD51I9TUkdn8V8YQaeIffjAoeOcW dzcm7q/A9qUCL59SW35i6wvvom3EWABVutkaBxb6qtwQ8DumGk6FL2bRcsGGG9EveS yxCQHkghOG1kajzcUXC0SJkq42uCbkaSCSKUY9h4WoYblQG3MHQpRWRQfkqACs0pwr OMRnixZivZNW4DRGjnDHN0D1YeINBlEnByv0+W+xa+XybkfXPXGybkF0NHrFCIQCxW nTw8R+wDjYzLT9ZFb6Xl7JuQ/eIc66Lgo6G71gTLNXWhkrdwhxoVC2yzuIv78Wmk5e 8qUFCJyA6EQDw== Date: Sat, 22 Aug 2026 15:29:46 +0100 From: "Lorenzo Stoakes (ARM)" To: Saravanan D Cc: Andrew Morton , linux-mm@kvack.org, David Hildenbrand , Zi Yan , Baolin Wang , "Liam R . Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Usama Arif , Peter Xu , Alex Williamson , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/huge_memory: allow huge pfnmaps regardless of THP mode Message-ID: References: <20260821070520.25759-1-saravanand@crusoe.ai> <20260821193220.91799-1-saravanand@crusoe.ai> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260821193220.91799-1-saravanand@crusoe.ai> On Fri, Aug 21, 2026 at 12:32:20PM -0700, Saravanan D wrote: > On Fri, Aug 21, 2026 at 09:03:15AM +0100, Lorenzo Stoakes (ARM) wrote: > > In any case if you'd taken 5 minutes to search the mailing list you'd see > > this was: > > > > a. Already submitted (so your patch reads like plagiarism). > > b. Already rejected in favour of me doing an actually sensible solution. > > > > https://lore.kernel.org/linux-mm/anL-NZkNMSSxN0YN@lucifer/ > > Apologies and please disregard my patch. I had not > searched the list before sending and was unaware of Cédric's patch > and your rework. Mine came from an independent observation of slow > VM boot times on Ubuntu based hosts running cloud-hypervisor with H100 > GPUs. The patch was prepared with AI assistance and should have > carried an Assisted-by tag. All of my future submissions will. > > I backported the diff you attached in your earlier response to > a 6.17 based kernel and ran it on a HGX host with four H100 GPUs, > each exposing a 128 GiB BAR1, with cloud-hypervisor. THP > mode was the Ubuntu default - madvise in all runs. > > VFIO_IOMMU_MAP_DMA 4 GPU VM boot > per 128 GiB BAR > 6.17 unpatched 20.7s 97s > 6.17 + your diff 0.4s 17s > > Each BAR mapped with 128 PUD faults. Your approach will definitely > improve VM boot times in our production. Very grateful for your > contribution. Thanks, always appreciate real world data :) I will send the actual patch at some point it's on my never ending TODO list... :) > > Thanks, > Saravanan D. -- Cheers, Lorenzo