-
Notifications
You must be signed in to change notification settings - Fork 349
Test user-space and enable CONFIG_USERSPACE on select platforms #10119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some opens on how we scale to more user tests.
zephyr/sof_syscall.c
Outdated
| @@ -0,0 +1,33 @@ | |||
| // SPDX-License-Identifier: BSD-3-Clause | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are going to have scheduler, library and llext syscalls so probably best to have a syscall directory here and a file for each subsystem.
| @@ -0,0 +1,61 @@ | |||
| // SPDX-License-Identifier: BSD-3-Clause | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likewise re names - my feeling is we will have more userspace tests so best to say userspace-locking.c
|
SOFCI TEST |
|
SOFCI TEST |
|
@lyakh why the DNM - assume we are pending on Zephyr PRs ? |
|
SOFCI TEST |
@lgirdwood yes, because we had problems with upgrading to the newest Zephyr and even now it isn't perfect but now I'll re-push this, dropping the last two commits |
6bf019c to
dd42a9a
Compare
kv2019i
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, a bit of a mismatch between "test user-space" and enabling CONFIG_USERSPACE for default for PTL targets....
|
|
||
| CONFIG_USERSPACE=y | ||
| CONFIG_APPLICATION_DEFINED_SYSCALL=y | ||
| CONFIG_MAX_THREAD_BYTES=3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really aligned with the PR title "test user-space". This PR in fact enables user-space for all PTL targets including next release. Is this intentional at this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kv2019i yes, just enabling the feature doesn't do much as long as we don't have user-space threads, but you're right, it's still a significant change and should be reflected in the PR title
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lyakh I think enabling is a good first step, but yeah, just looking at ifdefs in Zephyr source, there are a couple of thousand of ifdefs for CONFIG_USERSPACE, so compiled code will be quite differente, whether we user threads in SOF or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets get CONFIG_USERSPACE tested regularly now in CI. Yes we are not using, but lets get some comfort that enabling does not do any harm.
kv2019i
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified the title now, good to go now. The CI tests need to pass of course, but codewise this is ok to go.
@kv2019i thanks, yes, looks like we need gperf for Windows - at least that's the failure with the GitHub "build-windows" work flow |
|
@lyakh wrote:
Not sure about that. We've not had a maintainer for the Windows build in a long time, so not sure how we can keep it. If nobody signs up, I'd propose to remove it from CI and move on. So I was more referring to the required CI checks failing. |
|
Turns out VMH testing on MTL is badly broken https://sof-ci.01.org/sofpr/PR10119/build16827/devicetest/index.html , disable it until it's fixed. |
a8d5c25 to
aa8828d
Compare
cf0934e to
2e90058
Compare
zephyr/test/CMakeLists.txt
Outdated
| @@ -1,5 +1,11 @@ | |||
| if (CONFIG_SOF_BOOT_TEST) | |||
| if (CONFIG_SOF_BOOT_TEST AND NOT CONFIG_METEORLAKE) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not mtl?
abonislawski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are commits for more than 1 PR
zephyr/test/CMakeLists.txt
Outdated
| endif() | ||
|
|
||
| if (CONFIG_ACE_VERSION_3_0) | ||
| zephyr_library_sources_ifdef(CONFIG_SOF_BOOT_TEST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no dependency on CONFIG_USERSPACE?
if (CONFIG_SOF_BOOT_TEST)
zephyr_library_sources_ifdef(CONFIG_VIRTUAL_HEAP
vmh.c
)
zephyr_library_sources_ifdef(CONFIG_USERSPACE
userspace/ksem.c
)
endif()
PTL supports user-space, enable it by default, which also enabled the boot-time user-space test. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
|
CI: PTL failure https://sof-ci.01.org/sofpr/PR10119/build18064/devicetest/index.html?model=PTLH_RVP_NOCODEC&testcase=multiple-pipeline-all is I think the known out-of-memory regression |
|
Hmm, this now only enables the boot tests, so the commit summary is somewhat misleading now. This does explain why the fails happen differently as there's more use of the system before SOF application logic starts to be run, so we run out of memory sooner. Let's proceed with merge as rest of tests are passing and get some more coverage for this. |
Add a boot test to run a Zephyr user-space test