From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CE7A33F8A8 for ; Tue, 10 Feb 2026 13:55:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770731708; cv=none; b=eUXdkN1shjD2em043WokqfTD346KBCubm1FF4KuO96z7Ids6C7chhfrP20fEA3IW9fR8kSLV2j0jY+YnOZ4ZOYUFZ6gjYRmYywSQZ/OCU+PFsG4Xq03Z/On1yO5HR/WMRp1td/s4C088vQHRVVNdTE/tx2Z0Qtkn1xZGixSXaAw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770731708; c=relaxed/simple; bh=E487ggY+gJtWMvjVQrIXPGUchObSyDSpCtO5/93bakQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VfpiNZ0O4VTDk+KBZO9wuupagAfV3Uuh0pTbJoGv7KLXiXH1d78sXOy8UaZg0x165SZy0f53dBoZ+Na6DuJNPXPxpkVQv+Ing4j6O6RFvcqjkAOgTfLMaF+Oa/aJIfZ6yYt/Vs0hYkALhr53GeRSItdKbwwxO1IDWNoqnxjh0Qw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 54228339; Tue, 10 Feb 2026 05:55:00 -0800 (PST) Received: from [10.164.19.61] (unknown [10.164.19.61]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 455553F632; Tue, 10 Feb 2026 05:55:01 -0800 (PST) Message-ID: Date: Tue, 10 Feb 2026 19:24:59 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mm: map maximum pages possible in finish_fault To: Lorenzo Stoakes Cc: Matthew Wilcox , akpm@linux-foundation.org, david@kernel.org, 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 References: <20260206135648.38164-1-dev.jain@arm.com> <397482e7-3c89-48e5-9e8c-0798ac92cc05@arm.com> <0c956b6c-1d75-48f0-b55c-ae9887dce79f@lucifer.local> Content-Language: en-US From: Dev Jain In-Reply-To: <0c956b6c-1d75-48f0-b55c-ae9887dce79f@lucifer.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/02/26 7:09 pm, Lorenzo Stoakes wrote: > On Tue, Feb 10, 2026 at 06:58:37PM +0530, Dev Jain wrote: >> On 06/02/26 8:52 pm, Matthew Wilcox wrote: >>> 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? >> I can try to measure this. But, I constructed that testcase to test the >> code path, not to show a perf boost (although the boost is obvious enough >> so why not show it). As I say in the description: >> >> "Align finish_fault with filemap_map_pages, and map as many pages as >> possible, without crossing VMA/PMD/file boundaries." >> >> The patch should rather be seen as an extension to 19773df031bc >> ("mm/fault: try to map the entire file folio in finish_fault()"). >> The code which my patch removes, was added when the norm was to still >> perform per-page fault, the argument being, RSS inflation. >> >> Perhaps I can polish the patch description so that it clearly mentions >> what the objective is. >> > Can we make any new respin of this RFC please. I am especially not > confident given the immediate syzbot etc. Sure. > > If it's a speculative thing without great justification the series should > be RFC until such time the community decides it's worthwhile. > > Thanks, Lorenzo