public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] tests/i915/gem_create: use cpu_size in always_clear
@ 2022-11-02 10:52 Matthew Auld
  2022-11-02 11:41 ` [Intel-gfx] [igt-dev] " Das, Nirmoy
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Auld @ 2022-11-02 10:52 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-gfx, Nirmoy Das

If the we can't fit the buffer in the CPU visible portion of lmem, then
the kernel will be unable to migrate the pages on fault on small-bar
systems.  Note that this doesn't restrict where the pages are allocated,
but should just ensure we don't SIGBUS, if we need to migrate the pages.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6967
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
---
 tests/i915/gem_create.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c
index 9c695fa4..af530ccc 100644
--- a/tests/i915/gem_create.c
+++ b/tests/i915/gem_create.c
@@ -271,7 +271,7 @@ static void always_clear(int i915, const struct gem_memory_region *r, int timeou
 	struct thread_clear arg = {
 		.i915 = i915,
 		.region = r->ci,
-		.max = r->size / 2 >> 12, /* in pages */
+		.max = r->cpu_size / 2 >> 12, /* in pages */
 		.timeout = timeout,
 	};
 	const int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] tests/i915/gem_create: use cpu_size in always_clear
  2022-11-02 10:52 [Intel-gfx] [PATCH i-g-t] tests/i915/gem_create: use cpu_size in always_clear Matthew Auld
@ 2022-11-02 11:41 ` Das, Nirmoy
  0 siblings, 0 replies; 2+ messages in thread
From: Das, Nirmoy @ 2022-11-02 11:41 UTC (permalink / raw)
  To: Matthew Auld, igt-dev; +Cc: intel-gfx, Nirmoy Das


On 11/2/2022 11:52 AM, Matthew Auld wrote:
> If the we can't fit the buffer in the CPU visible portion of lmem, then

Need a minor fix of above sentence(unwanted "the")

Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>

> the kernel will be unable to migrate the pages on fault on small-bar
> systems.  Note that this doesn't restrict where the pages are allocated,
> but should just ensure we don't SIGBUS, if we need to migrate the pages.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6967
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Nirmoy Das <nirmoy.das@intel.com>
> ---
>   tests/i915/gem_create.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c
> index 9c695fa4..af530ccc 100644
> --- a/tests/i915/gem_create.c
> +++ b/tests/i915/gem_create.c
> @@ -271,7 +271,7 @@ static void always_clear(int i915, const struct gem_memory_region *r, int timeou
>   	struct thread_clear arg = {
>   		.i915 = i915,
>   		.region = r->ci,
> -		.max = r->size / 2 >> 12, /* in pages */
> +		.max = r->cpu_size / 2 >> 12, /* in pages */
>   		.timeout = timeout,
>   	};
>   	const int ncpus = sysconf(_SC_NPROCESSORS_ONLN);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-02 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-02 10:52 [Intel-gfx] [PATCH i-g-t] tests/i915/gem_create: use cpu_size in always_clear Matthew Auld
2022-11-02 11:41 ` [Intel-gfx] [igt-dev] " Das, Nirmoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox