linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Oscar Salvador <osalvador@suse.de>
Cc: lsf-pc@lists.linux-foundation.org,
	David Hildenbrand <david@redhat.com>,
	Peter Xu <peterx@redhat.com>, Muchun Song <muchun.song@linux.dev>,
	linux-mm@kvack.org
Subject: Re: [LSF/MM/BPF TOPIC] HugeTLB generic pagewalk
Date: Thu, 30 Jan 2025 22:46:37 +0000	[thread overview]
Message-ID: <Z5wBTdIOnAFr7L9E@casper.infradead.org> (raw)
In-Reply-To: <Z5vw82IhCV6tN1qG@localhost.localdomain>

On Thu, Jan 30, 2025 at 10:36:51PM +0100, Oscar Salvador wrote:
> HugeTLB has its own way of dealing with things.
> E.g: HugeTLB interprets everything as a pte: huge_pte_uffd_wp, huge_pte_clear_uffd_wp,
> huge_pte_dirty, huge_pte_modify, huge_pte_wrprotect etc.

This is a bug, not a feature.  It makes some horrendous assumptions
about how each architecture encodes its ptes/pmd/puds (ie they're all
compatible).  By and large they're mostly compatible, but there are some
awful hacks to work around the cases where they aren't.

> One of the challenges that this raises is that if we want pmd/pud walkers to
> be able to make sense of hugetlb stuff, we need to implement pud/pmd
> (maybe some pmd we already have because of THP) variants of those.

That's a good thing!  typesafety is good!  hugetlbfs tries to defeat it
and it works rather too well.



  parent reply	other threads:[~2025-01-30 22:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-30 21:36 Oscar Salvador
2025-01-30 22:45 ` Peter Xu
2025-01-30 22:46 ` Matthew Wilcox [this message]
2025-01-30 23:19 ` David Hildenbrand
2025-01-31 15:42   ` Christophe Leroy
2025-02-04 20:19     ` David Hildenbrand
2025-02-03 10:10   ` Oscar Salvador
2025-02-04 20:40     ` David Hildenbrand
2025-02-05  9:33       ` Oscar Salvador
2025-02-11 13:31         ` David Hildenbrand
2025-02-12  9:13           ` Oscar Salvador

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=Z5wBTdIOnAFr7L9E@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=david@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    --cc=peterx@redhat.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