Re: [PATCH igt] igt/gem_exec_schedule: Limit smoketest to the desired engines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Belgaumkar, Vinay (2018-02-12 18:20:31)
> 
> 
> On 2/10/2018 1:00 AM, Chris Wilson wrote:
> > We run the per-engine scheduling smoketests across all engines, the
> > opposite of what was intended!
> > 
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > ---
> >   tests/gem_exec_schedule.c | 12 ++++++++----
> >   1 file changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c
> > index b45ba1670..ec02d9943 100644
> > --- a/tests/gem_exec_schedule.c
> > +++ b/tests/gem_exec_schedule.c
> > @@ -208,11 +208,15 @@ static void smoketest(int fd, unsigned ring, unsigned timeout)
> >       uint32_t *ptr;
> >   
> >       nengine = 0;
> > -     for_each_engine(fd, engine) {
> > -             if (ignore_engine(fd, engine))
> > -                     continue;
> > +     if (ring == -1) {
> > +             for_each_engine(fd, engine) {
> > +                     if (ignore_engine(fd, engine))
> > +                             continue;
> >   
> > -             engines[nengine++] = engine;
> > +                     engines[nengine++] = engine;
> > +             }
> > +     } else {
> > +             engines[nengine++] = ring;
> >       }
> >       igt_require(nengine);
> 
> LGTM. However, do we need the random number generation(from 0 to 
> nengine) in the following code if a single engine is selected?

It's just a few instructions, if the bottleneck was in userspace then
yes, removing them would be useful. As it is, the test is an exercise in
struct_mutex contention.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux