Linux filesystem development
 help / color / mirror / Atom feed
From: "Jose A. Perez de Azpillaga" <azpijr@gmail.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>,
	Zi Yan <ziy@nvidia.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Zach O'Keefe <zokeefe@google.com>,
	Hugh Dickins <hughd@google.com>, Lorenzo Stoakes <ljs@kernel.org>,
	Kiryl Shutsemau <kas@kernel.org>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Dev Jain <dev.jain@arm.com>
Cc: "Liam R. Howlett" <liam@infradead.org>,
	Nico Pache <nico.pache@linux.dev>,
	Ryan Roberts <ryan.roberts@arm.com>,
	Barry Song <baohua@kernel.org>, Lance Yang <lance.yang@linux.dev>,
	Usama Arif <usama.arif@linux.dev>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
	linux-mm@kvack.org, Matthew Wilcox <willy@infradead.org>,
	Jan Kara <jack@suse.cz>, Johannes Weiner <hannes@cmpxchg.org>,
	Rik van Riel <riel@surriel.com>, Song Liu <songliubraving@fb.com>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2 0/3] mm: don't allocate page tables with the folio locked
Date: Mon, 30 Nov 2026 23:28:11 +0100	[thread overview]
Message-ID: <a54fc3e8-1a6d-42cc-b7dd-9b31f71079a7@gmail.com> (raw)
In-Reply-To: <c45c8b8c-0ccc-4e0e-898f-039f84fe1e56@kernel.org>

On 11/30/26 11:49 AM, David Hildenbrand (Arm) wrote:
> On 11/27/26 10:12, Jose A. Perez de Azpillaga wrote:
>> David asked for the remaining places that allocate with __GFP_FS while
>> holding a folio lock [1]. The fault path and khugepaged still allocate
>> page tables that way.
>>
>> Patch 1 allocates the deposit table in do_set_pmd() in a NOFS scope.
>> Patch 2 does the same for the tables set_huge_pmd() allocates.
>> Patch 3 makes finish_fault() retry the fault instead of allocating when
>> the page table went away after __do_fault() checked the PMD.
>>
>> Tested on x86_64 and on ppc64le with the hash MMU in QEMU.
> 
> While doing some digging over the weekend, I think we have another case where we
> allocate with the folio lock held: shmem_replace_folio().
> 
> I think the calling code can make the decision (shmem_should_replace_folio)
> without holding the folio lock.
> 
> Can you take care of that as well? Can do separately from this series.

sure, why not? I'll send it separately :)

-- 
cheers,
jose a. p-a

  reply	other threads:[~2026-11-30 22:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  9:12 [PATCH v2 0/3] mm: don't allocate page tables with the folio locked Jose A. Perez de Azpillaga
2026-11-27  9:12 ` [PATCH v2 1/3] mm/memory: allocate the deposit page table with NOFS in do_set_pmd() Jose A. Perez de Azpillaga
2026-11-30  7:15   ` Baolin Wang
2026-11-30 10:49   ` David Hildenbrand (Arm)
2026-11-30 18:33   ` Lorenzo Stoakes (ARM)
2026-11-30 22:21     ` Jose A. Perez de Azpillaga
2026-11-27  9:12 ` [PATCH v2 2/3] mm/khugepaged: allocate page tables with NOFS in set_huge_pmd() Jose A. Perez de Azpillaga
2026-11-30  7:17   ` Baolin Wang
2026-11-30 10:50   ` David Hildenbrand (Arm)
2026-11-30 18:37   ` Lorenzo Stoakes (ARM)
2026-11-27  9:12 ` [PATCH v2 3/3] mm/memory: don't allocate in finish_fault() with the folio locked Jose A. Perez de Azpillaga
2026-11-30  7:28   ` Baolin Wang
2026-11-30 10:51   ` David Hildenbrand (Arm)
2026-11-30 18:52   ` Lorenzo Stoakes (ARM)
2026-11-30 22:25     ` Jose A. Perez de Azpillaga
2026-11-30 10:49 ` [PATCH v2 0/3] mm: don't allocate page tables " David Hildenbrand (Arm)
2026-11-30 22:28   ` Jose A. Perez de Azpillaga [this message]
2026-11-30 10:51 ` David Hildenbrand (Arm)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a54fc3e8-1a6d-42cc-b7dd-9b31f71079a7@gmail.com \
    --to=azpijr@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=kas@kernel.org \
    --cc=lance.yang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=nico.pache@linux.dev \
    --cc=riel@surriel.com \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=songliubraving@fb.com \
    --cc=usama.arif@linux.dev \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.com \
    --cc=zokeefe@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox