From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH igt v3] igt/gem_exec_scheduler: HAS_SCHEDULER no longer means HAS_PREEMPTION
Date: Thu, 28 Sep 2017 17:33:38 +0300 [thread overview]
Message-ID: <1506609218.9186.48.camel@linux.intel.com> (raw)
In-Reply-To: <20170927184752.30697-1-chris@chris-wilson.co.uk>
On Wed, 2017-09-27 at 19:47 +0100, Chris Wilson wrote:
> Michal wants to limit machines that can do preemption, which means that
> we no longer can assume that if we have a scheduler for execbuf, that
> implies we have preemption.
>
> v2: Try a capability mask instead
> v3: Pretty print the caps.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
<SNIP>
> +++ b/tests/gem_exec_schedule.c
> @@ -32,7 +32,12 @@
> #include "igt_rand.h"
> #include "igt_sysfs.h"
>
> +#define BIT(x) (1ul << (x))
> +
> #define LOCAL_PARAM_HAS_SCHEDULER 41
> +#define HAS_SCHEDULER BIT(0)
> +#define HAS_PRIORITY BIT(1)
> +#define HAS_PREEMPTION BIT(2)
This seems to be all spaces?
> +static unsigned int has_scheduler(int fd)
> {
> drm_i915_getparam_t gp;
> - int has = -1;
> + unsigned int caps = 0;
> + char buf[200];
> + size_t len = 0;
>
> gp.param = LOCAL_PARAM_HAS_SCHEDULER;
> - gp.value = &has;
> + gp.value = (int *)∩︀
> drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
>
> - return has > 0;
> + if (!caps)
> + return 0;
> +
> + len = snprintf(buf, sizeof(buf), "Has kernel scheduler");
> + if (caps & HAS_PRIORITY)
> + len += snprintf(buf + len, sizeof(buf) - len,
> + "%s context priorities",
> + caps & (HAS_PRIORITY - 2) ? "," : " with");
> +
> + if (caps & HAS_PREEMPTION)
> + len += snprintf(buf + len, sizeof(buf) - len,
> + "%s batchbuffer preemption",
> + caps & (HAS_PREEMPTION - 2) ? "," : " with");
The output is not going to be published in PEOPLE magazine, maybe we
can do a simpler indented "- with ..." prints :P
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-09-28 14:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 20:48 [PATCH igt] igt/gem_exec_scheduler: HAS_SCHEDULER no longer means HAS_PREEMPTION Chris Wilson
2017-09-25 20:56 ` Chris Wilson
2017-09-25 21:25 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-26 3:22 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-26 9:32 ` [PATCH igt] " Chris Wilson
2017-09-26 9:41 ` Chris Wilson
2017-09-26 12:14 ` Joonas Lahtinen
2017-09-26 12:21 ` Chris Wilson
2017-09-27 12:24 ` Chris Wilson
2017-09-26 18:32 ` ✓ Fi.CI.BAT: success for igt/gem_exec_scheduler: HAS_SCHEDULER no longer means HAS_PREEMPTION (rev2) Patchwork
2017-09-27 3:36 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-09-27 18:47 ` [PATCH igt v3] igt/gem_exec_scheduler: HAS_SCHEDULER no longer means HAS_PREEMPTION Chris Wilson
2017-09-28 14:33 ` Joonas Lahtinen [this message]
2017-09-27 19:38 ` ✓ Fi.CI.BAT: success for igt/gem_exec_scheduler: HAS_SCHEDULER no longer means HAS_PREEMPTION (rev3) Patchwork
2017-09-28 1:16 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-09-28 16:01 ` ✓ Fi.CI.IGT: success " Patchwork
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=1506609218.9186.48.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.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 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.