From: Peter Senna Tschudin <peter.senna@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [i-g-t PATCH V2] tests/intel/xe_pm: one suspend/resume cycle for all xe engines
Date: Sat, 28 Sep 2024 09:46:25 +0200 [thread overview]
Message-ID: <e90bf39e-c7fe-4007-90ce-0a1a3585fa08@linux.intel.com> (raw)
In-Reply-To: <Zvbr84hnp1dBnfGg@intel.com>
Hi Rodrigo,
Thank you very much for the review! I addressed most of your comments in V3, and I will skip the comments I fixed in V3.
On 27.09.2024 19:31, Rodrigo Vivi wrote:
> On Fri, Sep 27, 2024 at 01:38:14PM +0200, Peter Senna Tschudin wrote:
>> Changes the behavior from running one suspend/resume cycle for each
>> xe engine to running a single suspend and resume cycle for all engines
>> considerably reducing the xe_pm run time.
>
> \o/
>
> Thanks a lot for that.
>
> I'm wondering if the thread is not an overkill, but I don't have
> cleaner suggestions...
[...]
>> +}
>> +
>> +/* Do one suspend and resume cycle for all xe engines.
>> + * - For each xe engine: Create a thread for test_exec
>> + * - Pause the thread where it expects to suspend and resume
>> + * - Wait for all threads to reach the pause
>> + * - Run one suspend and resume cycle
>> + * - Wake up all threads
>> + * - Wait the threads to complete
Updated to state which code paths run concurrently:
/* Do one suspend and resume cycle for all xe engines.
* - Create a child_exec() thread for each xe engine. Run only one thread
* at a time. The parent will wait for the child to signal it is ready
* to sleep before creating a new thread.
* - Put child_exec() to sleep where it expects to suspend and resume
* - Wait for all child_exec() threads to sleep
* - Run one suspend and resume cycle
* - Wake up all child_exec() threads at once. They will run concurrently.
* - Wait for all child_exec() threads to complete
*/
>
> looks a correct flow for the system suspend... something strange for the runtime pm,
> although d3hot and d3cold works for me here in my DG2...
>
> I mean, during the thread child execution we are checking if the device is in d3...
> But with multiple threads executing that, we cannot guarantee that anymore that we are
> in d3.... That flow is broken....
Yep, one thread per engine execute that, but only one at a time. There is no concurrency between threads until all threads go to sleep. Does it make a difference?
>
> I believe it just works because in_d3 also has some sleeps and waits so all
> the threads are executing and waiting... but we shouldn't rely on that.
>
> Perhaps we should split the regular suspend and runtime_suspend tests entirely?
> trying to encapsulate and reuse the exec functions...
I will be happy to make the change with a little bit of guidance.
[...]
Thank you again Rodrigo!
next prev parent reply other threads:[~2024-09-28 7:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 9:44 [PATCH] tests/intel/xe_pm: one suspend/resume cycle for all xe engines Peter Senna Tschudin
2024-09-27 11:38 ` [i-g-t PATCH V2] " Peter Senna Tschudin
2024-09-27 17:31 ` Rodrigo Vivi
2024-09-28 7:46 ` Peter Senna Tschudin [this message]
2024-09-27 15:21 ` ✓ Fi.CI.BAT: success for tests/intel/xe_pm: one suspend/resume cycle for all xe engines (rev3) Patchwork
2024-09-27 16:13 ` ✓ CI.xeBAT: " Patchwork
2024-09-28 7:35 ` [i-g-t PATCH V3] tests/intel/xe_pm: one suspend/resume cycle for all xe Peter Senna Tschudin
2024-09-30 15:01 ` Rodrigo Vivi
2024-09-28 8:20 ` ✓ CI.xeBAT: success for tests/intel/xe_pm: one suspend/resume cycle for all xe engines (rev4) Patchwork
2024-09-28 8:26 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-09-30 10:51 ` Peter Senna Tschudin
2024-09-30 11:11 ` Peter Senna Tschudin
2024-09-28 12:02 ` ✗ CI.xeFULL: failure for tests/intel/xe_pm: one suspend/resume cycle for all xe engines (rev3) Patchwork
2024-09-28 18:39 ` ✗ Fi.CI.IGT: " Patchwork
2024-09-30 11:19 ` Peter Senna Tschudin
2024-09-30 15:00 ` [i-g-t PATCH v4] tests/intel/xe_pm: one suspend/resume cycle for all xe engines Peter Senna Tschudin
2024-09-30 21:07 ` ✗ Fi.CI.BUILD: failure for tests/intel/xe_pm: one suspend/resume cycle for all xe engines (rev5) 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=e90bf39e-c7fe-4007-90ce-0a1a3585fa08@linux.intel.com \
--to=peter.senna@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=rodrigo.vivi@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.