mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Eliav Farber <farbere@amazon.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	David Hildenbrand <david@kernel.org>,
	 "Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	 Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	 Michal Hocko <mhocko@suse.com>, Jann Horn <jannh@google.com>,
	Pedro Falcato <pfalcato@suse.de>,
	 linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/4] mm, uio: huge PFN mappings for /dev/mem and UIO
Date: Mon, 16 Nov 2026 15:12:42 +0000	[thread overview]
Message-ID: <avsbLgh-zBGmE4KF@gremlin> (raw)
In-Reply-To: <20261112125638.12209-1-farbere@amazon.com>

Err, there unanswered questions on v1 of this review, so why have you
sent a respin?...

I also seem to remember David asking you to slow down on the respins
earlier too.

AI might make it easy to send stuff out but you're outsourcing work to
maintainers here...

On Thu, Nov 12, 2026 at 12:56:34PM +0000, Eliav Farber wrote:
> /dev/mem and UIO both hand large, well-aligned physical regions to
> userspace, and both populate them eagerly at mmap() time with
> remap_pfn_range(), that is with 4K PTEs however large and well aligned
> the region is. vfio-pci moved to fault-driven population in commit
> f9e54c3a2f5b ("vfio/pci: implement huge_fault support") and gets PMD and
> PUD mappings where alignment allows. This series does the same for
> /dev/mem and UIO, and factors out the logic vfio-pci open-codes so that a
> third driver does not have to repeat it.
>
> Two things have to be solved to do this outside vfio-pci:

[blah
blah
blah
blah
...]

Just way way way too many schloppy words. Write this yourself please.

>
> Testing
> =======
>
> Tested on x86_64 at 7.4-rc2, and on arm64 at 7.3.4, which is what the
> test hardware runs. The four patches are identical in both trees.

[blah
blah
blah
blah
....]

> Two things none of this reaches: 1G PUD mappings anywhere but x86, as the
> test hardware has no suitable 1G-aligned region, and the huge zero folio
> fallback in patch 2, which needs STRICT_DEVMEM=n and has no check
> targeting it.

This is so TOO MUCH noisy, schloppy information. Write this stuff yourself
and small.

I hate to say it but it feels so so lazy to get an AI to do stuff like this
without even bothering to reference _how things are done in mm_.

Be considerate please, we don't have time to read your novels.

And you've been told before...

>
> Performance
> ===========
>
> Unchanged from v1, where the numbers are tabulated; nothing in v2 touches
> the huge path. On arm64 the fault counts were re-measured and are
> identical: 128 faults for a 256MB /dev/mem region against 65536 for a 4K
> mapping, and 4 against 2048 for an 8MB UIO region. Against today's eager
> mapping the series cut mmap() by 95x on the 256MB region and 5.6x on the
> 8MB one, total setup by about 12% on both, and the dTLB read-miss count
> by about 80x.

We don't need a (schloppy) 'perf since last-version' update thanks.

>
> Changes since v1
> ================
>
> - Patch 2: the order-0 path passes the fault's write flag too, so a
>   caller that does not retry the access, fixup_user_fault() from an
>   ->access handler, is not left with a read-only pte.
>   vmf_insert_pfn_prot() keeps its signature; its body moved into a
>   static __vmf_insert_pfn_prot() taking mkwrite.
>
> - Patches 3 and 4: COW mappings get their own vm_operations_struct
>   defining only .access, instead of a COW test inside the fault
>   handler, which was not enough: installing ->fault at all skips
>   do_fault()'s recheck of a pte cleared under the page table lock.
>
> - Commit messages: corrected the L1TF claim in patches 3 and 4 -
>   mmap(PROT_NONE) above l1tf_pfn_limit() now succeeds, and nothing
>   fails later - and dropped patch 2's claim that uffd-wp can
>   write-protect such a mapping.
>
> - Patch 3: the commit message now also documents what the fault-time
>   range_is_allowed() re-check changes without CONFIG_IO_STRICT_DEVMEM,
>   where revoke_iomem() is a no-op.

This is so schloppy and WAY TOO MANY WORDS. Please just write these things
yourself...

>
> The write-flag and COW changes came from sashiko-bot's review of v1.

You credit sashiko but not David... Please follow how _other established mm
people_ do these things please.

See [0] for an example. Note the brevity and actually crediting people who
asked, so they know that their feedback was addressed.

>
> v1: https://lore.kernel.org/all/20261111113045.35368-1-farbere@amazon.com/

See https://lore.kernel.org/all/042795ab-e8af-443f-b34c-72c674c0ea32@kernel.org/

You were told to rewrite your answer, instead you sent a v2. This isn't how
to interact on-list.

--
Cheers, Lorenzo

[0]: https://lore.kernel.org/linux-mm/20261113-mason-migrate-et-al-fixes-v2-0-50a2ed382b61@kernel.org/

  parent reply	other threads:[~2026-11-16 15:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 12:56 Eliav Farber
2026-11-12 12:56 ` [PATCH v2 1/4] mm: add MMAP_PFN_TRACK action and pfn_range_track() for lazy PFN maps Eliav Farber
2026-11-12 12:56 ` [PATCH v2 2/4] mm: add vmf_insert_pfn_order() and vmf_pfn_order_ok() helpers Eliav Farber
2026-11-12 12:56 ` [PATCH v2 3/4] mm/char-mem: implement huge_fault support for /dev/mem Eliav Farber
2026-11-12 12:56 ` [PATCH v2 4/4] uio: implement huge_fault support for physical mappings Eliav Farber
2026-11-16 15:12 ` Lorenzo Stoakes (ARM) [this message]
2026-11-16 15:17   ` [PATCH v2 0/4] mm, uio: huge PFN mappings for /dev/mem and UIO Lorenzo Stoakes (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=avsbLgh-zBGmE4KF@gremlin \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=farbere@amazon.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jannh@google.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=pfalcato@suse.de \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /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

all inboxes | Powered by JetHome®