Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH] tests/xe: Add system_allocator test
Date: Wed, 16 Apr 2025 11:36:28 -0700	[thread overview]
Message-ID: <Z//4rF6oSl/jlCjT@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <ac738d56a54052862f5e9fc74f905d05315c33c4.camel@linux.intel.com>

On Wed, Apr 16, 2025 at 07:09:40PM +0200, Thomas Hellström wrote:
> Hi, Matt,
> 
> On Tue, 2025-04-15 at 19:20 -0700, Matthew Brost wrote:
> > Test various uses of system allocator in single thread, multiple
> > threads, and multiple processes.
> > 
> > Features tested:
> >  - Malloc with various size
> >  - Mmap with various sizes and flags including file backed mappings
> >  - Mixing BO allocations with system allocator
> >  - Various page sizes
> >  - Dynamically freeing / unmapping memory
> >  - Sharing VM across threads
> >  - Faults racing on different hardware engines / GTs / Tiles
> >  - GPU faults and CPU faults racing
> >  - CPU faults on multiple threads racing
> >  - CPU faults on multiple process racing
> >  - GPU faults of memory not faulted in by CPU
> >  - Partial unmap of allocations
> >  - Attempting to unmap system allocations when GPU has mappings
> >  - Eviction of both system allocations and BOs
> >  - Forking child processes and reading data from VRAM
> >  - mremap data in VRAM
> >  - Protection changes
> >  - Multiple faults per execbuf
> > 
> > Running on LNL, BMG, PVC 1 tile, and PVC 2 tile.
> > 
> > v2:
> >  - Rebase
> >  - Fix memory allocation to not interfear with malloc (Thomas)
> > 
> > Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> 
> Did you have a chance to look at the memory (or rather virtual
> adddress) leaks on the tests as well?  
> With the old version it would exceed 1GB after some time, which I
> believe caused some slowdown.
> 

I have not looked at that - rather just fixed mmaping mallocs which
would eventually cause the test to fail with -ENOSPC (e.g. if just ran
xe_exec_system_alloc eventually everything started to fail whereas now I
can run xe_exec_system_alloc to completion).

I wonder if the way I changed memory allocation fixed the leaks, let me
try running under valgrind and see if anything pops.

Matt

> Unfortunately the igt library funcs also leaks memory so running the
> test under valgrind was a bit noisy, but helped to some extent.
> 
> /Thomas
> 

  reply	other threads:[~2025-04-16 18:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16  2:20 [PATCH] tests/xe: Add system_allocator test Matthew Brost
2025-04-16 17:09 ` Thomas Hellström
2025-04-16 18:36   ` Matthew Brost [this message]
2025-04-18 15:47 ` Francois Dugast
2025-04-18 19:44   ` Matthew Brost
2025-04-24 19:28     ` Francois Dugast
2025-04-24 19:46       ` Matthew Brost
  -- strict thread matches above, loose matches on Subject: below --
2025-04-25 18:20 Matthew Brost
2024-10-16  3:04 Matthew Brost
2024-08-27 23:16 Matthew Brost
2024-08-21  1:41 Matthew Brost
2024-05-21  4:18 [PATCH] tests/xe: Add System Allocator test Matthew Brost

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=Z//4rF6oSl/jlCjT@lstrano-desk.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=thomas.hellstrom@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox