-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
percpu reg store this_task #13726
Open
hujun260
wants to merge
3
commits into
apache:master
Choose a base branch
from
hujun260:apache_4
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
percpu reg store this_task #13726
+132
−87
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reason: We can utilize percpu storage to hold information about the current running task. If we intend to implement this feature, we would need to define two macros that help us manage this percpu information effectively. up_this_task: This macro is designed to read the contents of the percpu register to retrieve information about the current running task.This allows us to quickly access task-specific data without having to disable interrupts, access global variables and obtain the current cpu index. up_update_task: This macro is responsible for updating the contents of the percpu register.It is typically called during initialization or when a context switch occurs to ensure that the percpu register reflects the information of the newly running task. Configuring NuttX and compile: $ ./tools/configure.sh -l qemu-armv8a:nsh_smp $ make Running with qemu $ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \ -machine virt,virtualization=on,gic-version=3 \ -net none -chardev stdio,id=con,mux=on -serial chardev:con \ -mon chardev=con,mode=readline -kernel ./nuttx Signed-off-by: hujun5 <[email protected]>
Signed-off-by: hujun5 <[email protected]>
…task more earlier. A call stack looks like the following: sched_idletask syslog_write nx_vsyslog syslog getreg64 gic_validate_redist_version arm64_gic_init arm64_gic_secondary_init arm64_boot_secondary_c_routine Signed-off-by: hujun5 <[email protected]>
github-actions
bot
added
Area: Networking
Effects networking subsystem
Arch: arm64
Issues related to ARM64 (64-bit) architecture
Area: File System
File System issues
Area: OS Components
OS Components issues
Size: M
The size of the change in this PR is medium
labels
Sep 29, 2024
[Experimental Bot, please feedback here] The provided PR description is insufficient based on the NuttX requirements. Here's why and how to improve it: Missing Information
Recommendations
By addressing these points, your PR will be much clearer and easier for the NuttX maintainers to review. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Arch: arm64
Issues related to ARM64 (64-bit) architecture
Area: File System
File System issues
Area: Networking
Effects networking subsystem
Area: OS Components
OS Components issues
Size: M
The size of the change in this PR is medium
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
We can utilize percpu storage to hold information about the
current running task. If we intend to implement this feature, we would
need to define two macros that help us manage this percpu information
effectively.
up_this_task: This macro is designed to read the contents of the percpu
register to retrieve information about the current
running task.This allows us to quickly access
task-specific data without having to disable interrupts,
access global variables and obtain the current cpu index.
up_update_task: This macro is responsible for updating the contents of
the percpu register.It is typically called during
initialization or when a context switch occurs to ensure
that the percpu register reflects the information of the
newly running task.
Impact
arm64
Testing