All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Matthew Auld <matthew.auld@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH v2] tests/intel/xe_vm: Always have at least 2 pages bound in hammer sections
Date: Fri, 12 Apr 2024 01:58:55 +0000	[thread overview]
Message-ID: <ZhiVX4KFN9vs+OSk@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <165db5d9-b43a-45dc-bb66-4fc6436fb648@intel.com>

On Wed, Apr 10, 2024 at 09:42:37AM +0100, Matthew Auld wrote:
> On 10/04/2024 02:21, Matthew Brost wrote:
> > If the prefetch buffer is 2k or larger the hammer sections will prefetch
> > the next page, if the page is unbound a fault will occur. Account for
> > larger prefetchs by always having at least 2 pages bound for the hammer
> > thread.
> 
> Is this referring to bb_start pre-fetch? It should be + 4K at most for xe2.

Yes.

> Is it possible to make the test consider xe_cs_prefetch_size() somehow
> instead of hardcoding? Or perhaps that is tricky here? Otherwise maybe we

That's tricky.

> can add an assert that xe_cs_prefetch_size() remains <= 4K for this test,

Will add an assert to the test.

> with comment explaining what needs to change if we start triggering the
> assert? Thinking is that would be easier to debug and fix than seeing CAT
> errors, faults etc. if the pre-fetch changes again.

Will also add a comment.

Thanks,
Matt

> 
> > 
> > v2:
> >   - Missed table entry
> > 
> > Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> > ---
> >   tests/intel/xe_vm.c | 16 ++++++++--------
> >   1 file changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
> > index bd4973cc38..9f9f61b7ef 100644
> > --- a/tests/intel/xe_vm.c
> > +++ b/tests/intel/xe_vm.c
> > @@ -1843,12 +1843,12 @@ igt_main
> >   		{ "all", 4, 2, 0, 4, 0 },
> >   		{ "one-partial", 4, 1, 1, 2, 0 },
> >   		{ "either-side-partial", 4, 2, 1, 2, 0 },
> > -		{ "either-side-partial-hammer", 4, 2, 1, 2,
> > +		{ "either-side-partial-hammer", 6, 2, 2, 2,
> >   			MAP_FLAG_HAMMER_FIRST_PAGE },
> > -		{ "either-side-partial-split-page-hammer", 4, 2, 1, 2,
> > +		{ "either-side-partial-split-page-hammer", 6, 2, 2, 2,
> >   			MAP_FLAG_HAMMER_FIRST_PAGE |
> >   			MAP_FLAG_LARGE_PAGE },
> > -		{ "either-side-partial-large-page-hammer", 4, 2, 1, 2,
> > +		{ "either-side-partial-large-page-hammer", 6, 2, 2, 2,
> >   			MAP_FLAG_HAMMER_FIRST_PAGE |
> >   			MAP_FLAG_LARGE_PAGE |
> >   			MAP_FLAG_LARGE_PAGE_NO_SPLIT },
> > @@ -1857,7 +1857,7 @@ igt_main
> >   		{ "front", 4, 2, 1, 3, 0 },
> >   		{ "many-all", 4 * 8, 2 * 8, 0 * 8, 4 * 8, 0 },
> >   		{ "many-either-side-partial", 4 * 8, 2 * 8, 1, 4 * 8 - 2, 0 },
> > -		{ "many-either-side-partial-hammer", 4 * 8, 2 * 8, 1, 4 * 8 - 2,
> > +		{ "many-either-side-partial-hammer", 4 * 8, 2 * 8, 2, 4 * 8 - 4,
> >   			MAP_FLAG_HAMMER_FIRST_PAGE },
> >   		{ "many-either-side-full", 4 * 8, 4 * 8, 1 * 8, 2 * 8, 0 },
> >   		{ "many-end", 4 * 8, 4, 0 * 8, 3 * 8 + 2, 0 },
> > @@ -1902,12 +1902,12 @@ igt_main
> >   		{ "one-partial", 4, 1, 1, 2, 0 },
> >   		{ "either-side-partial", 4, 2, 1, 2, 0 },
> >   		{ "either-side-full", 4, 4, 1, 2, 0 },
> > -		{ "either-side-partial-hammer", 4, 2, 1, 2,
> > +		{ "either-side-partial-hammer", 6, 2, 2, 2,
> >   			MAP_FLAG_HAMMER_FIRST_PAGE },
> > -		{ "either-side-partial-split-page-hammer", 4, 2, 1, 2,
> > +		{ "either-side-partial-split-page-hammer", 6, 2, 2, 2,
> >   			MAP_FLAG_HAMMER_FIRST_PAGE |
> >   			MAP_FLAG_LARGE_PAGE },
> > -		{ "either-side-partial-large-page-hammer", 4, 2, 1, 2,
> > +		{ "either-side-partial-large-page-hammer", 6, 2, 2, 2,
> >   			MAP_FLAG_HAMMER_FIRST_PAGE |
> >   			MAP_FLAG_LARGE_PAGE |
> >   			MAP_FLAG_LARGE_PAGE_NO_SPLIT },
> > @@ -1915,7 +1915,7 @@ igt_main
> >   		{ "front", 4, 2, 1, 3, 0 },
> >   		{ "many-all", 4 * 8, 2 * 8, 0 * 8, 4 * 8, 0 },
> >   		{ "many-either-side-partial", 4 * 8, 2 * 8, 1, 4 * 8 - 2, 0 },
> > -		{ "many-either-side-partial-hammer", 4 * 8, 2 * 8, 1, 4 * 8 - 2,
> > +		{ "many-either-side-partial-hammer", 4 * 8, 2 * 8, 2, 4 * 8 - 4,
> >   			MAP_FLAG_HAMMER_FIRST_PAGE },
> >   		{ "userptr-all", 4, 2, 0, 4, MAP_FLAG_USERPTR },
> >   		{ "userptr-one-partial", 4, 1, 1, 2, MAP_FLAG_USERPTR },

      reply	other threads:[~2024-04-12  2:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10  1:21 [PATCH v2] tests/intel/xe_vm: Always have at least 2 pages bound in hammer sections Matthew Brost
2024-04-10  1:59 ` ✓ CI.xeBAT: success for tests/intel/xe_vm: Always have at least 2 pages bound in hammer sections (rev2) Patchwork
2024-04-10  2:25 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-04-10  8:42 ` [PATCH v2] tests/intel/xe_vm: Always have at least 2 pages bound in hammer sections Matthew Auld
2024-04-12  1:58   ` Matthew Brost [this message]

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=ZhiVX4KFN9vs+OSk@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=matthew.auld@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.