From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: "Christian König" <christian.koenig@amd.com>,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
intel-xe@lists.freedesktop.org
Cc: airlied@gmail.com, matthew.brost@intel.com
Subject: Re: [PATCH] drm/ttm: WIP limit the TTM pool to 32bit CPUs
Date: Tue, 12 Aug 2025 12:19:51 +0200 [thread overview]
Message-ID: <72385b2e6aa14b31b5d24deee0bc744af834f2da.camel@linux.intel.com> (raw)
In-Reply-To: <1ffa7bec-ed8d-47d7-9002-66c08b1c6e8f@amd.com>
On Tue, 2025-08-12 at 11:17 +0200, Christian König wrote:
> On 11.08.25 17:16, Thomas Hellström wrote:
> > >
> > > > FWIW If I understand the code correctly, i915 bypasses this by
> > > > setting
> > > > up user-space mappings not by vm_insert_pfn_prot() but using
> > > > apply_to_page_range(), mapping the whole bo.
> > >
> > > Yeah, that's probably not something we can do. Even filling in
> > > 2MiB
> > > of address space at a time caused performance problems for TTM.
> >
> > Wasn't that because of repeated calls to vmf_insert_pfn_prot(),
> > repeating the caching checks and page-table walk all the time?
>
> Only partially, the main problem was that only a fraction of the BO
> was actually CPU accessed. So filling in more than faulted was just
> overhead.
>
> > I think apply_to_page_range() should be pretty fast. Also, to avoid
> > regressions due to changing the number of prefaulted pages, we
> > could
> > perhaps honor the MADV_RANDOM and MADV_SEQUENTIAL advises for UMD
> > to
> > use; one faulting a single page only, one faulting the whole bo
>
> Ah! In my thinking apply_to_page_range() would always fault in the
> whole BO, if that still works for only a partial range than that
> should be ok.
Yes, it looks like it works with partial ranges.
>
> > , but
> > also see below:
> >
> > >
> > > We should probably just drop overriding the attributes in
> > > vmf_insert_pfn_prot().
> >
> > I think either solution will see resistance with arch people. We
> > should
> > probably involve them in the discussion.
>
> Any specific person I should CC or just x86@kernel.org?
scripts/get_maintainer.pl of a tiny change into the PAT code gives me
the following: Hopefully some of these should trigger some replies and
insights:
./scripts/get_maintainer.pl 0001-arch-mm-dummy-commit.patch
Dave Hansen <dave.hansen@linux.intel.com> (maintainer:X86 MM)
Andy Lutomirski <luto@kernel.org> (maintainer:X86 MM)
Peter Zijlstra <peterz@infradead.org> (maintainer:X86 MM)
Thomas Gleixner <tglx@linutronix.de> (maintainer:X86 ARCHITECTURE (32-
BIT AND 64-BIT))
Ingo Molnar <mingo@redhat.com> (maintainer:X86 ARCHITECTURE (32-BIT AND
64-BIT),commit_signer:10/16=62%,authored:2/16=12%)
Borislav Petkov <bp@alien8.de> (maintainer:X86 ARCHITECTURE (32-BIT AND
64-BIT))
x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
"H. Peter Anvin" <hpa@zytor.com> (reviewer:X86 ARCHITECTURE (32-BIT AND
64-BIT))
Andrew Morton <akpm@linux-foundation.org> (commit_signer:7/16=44%)
David Hildenbrand <david@redhat.com>
(commit_signer:6/16=38%,authored:6/16=38%,added_lines:68/105=65%,remove
d_lines:214/292=73%)
"Liam R. Howlett" <Liam.Howlett@oracle.com> (commit_signer:5/16=31%)
Lorenzo Stoakes <lorenzo.stoakes@oracle.com> (commit_signer:5/16=31%)
Sean Christopherson <seanjc@google.com>
(authored:2/16=12%,added_lines:15/105=14%,removed_lines:31/292=11%)
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
(authored:1/16=6%)
Shivank Garg <shivankg@amd.com> (authored:1/16=6%)
Peter Xu <peterx@redhat.com> (added_lines:7/105=7%)
Dan Williams <dan.j.williams@intel.com> (removed_lines:27/292=9%)
>
> Thanks,
> Christian
next prev parent reply other threads:[~2025-08-12 10:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 13:28 [PATCH] drm/ttm: WIP limit the TTM pool to 32bit CPUs Christian König
2025-08-06 13:58 ` ✗ CI.checkpatch: warning for " Patchwork
2025-08-06 14:00 ` ✓ CI.KUnit: success " Patchwork
2025-08-06 15:07 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-08-06 17:03 ` ✗ Xe.CI.Full: " Patchwork
2025-08-06 17:43 ` [PATCH] " Thomas Hellström
2025-08-07 9:53 ` Christian König
2025-08-07 16:47 ` Thomas Hellström
2025-08-11 11:51 ` Christian König
2025-08-11 15:16 ` Thomas Hellström
2025-08-12 9:17 ` Christian König
2025-08-12 10:19 ` Thomas Hellström [this message]
2025-08-06 18:57 ` ✓ i915.CI.BAT: success for " Patchwork
2025-08-06 22:38 ` ✓ i915.CI.Full: " Patchwork
2025-08-09 4:07 ` [PATCH] " kernel test robot
2025-08-12 10:36 ` Matthew Auld
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=72385b2e6aa14b31b5d24deee0bc744af834f2da.camel@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=airlied@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.