commit | e20ddbbc3ed61b3a32b0426d591a2a449f7788fd | [log] [tgz] |
---|---|---|
author | David Greenaway <dgreenaway@google.com> | Tue Jul 23 03:31:42 2019 +0000 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Tue Jul 23 03:31:42 2019 +0000 |
tree | 73723d58c3a34a0a3c6eb1c1a5249771c236ad1c | |
parent | 7bbeb47699a20128dfe168f5716fa98092ac1e66 [diff] |
[zircon] API for setting thread affinity in profiles. Add support to |zx_profile_create| for specifying thread affinity, and expose via |zx_object_get_info| the last CPU a particular thread was scheduled on to facilitate testing. No implementation actually exists at this point; this change simply updates the API. More specifically, this CL performs three changes: * First, we add support for a CPU affinity mask. This is specified by by a pointer to a CPU mask and the size of the mask. * Second, inline the scheduler |priority| argument from inside of the union in |zx_profile_t| to being directly in the top-level of the struct. Our longer term vision for profile objects is that they be atomic: that is, a thread can have only a single profile applied to it at a point. However, by having the scheduler parameters inside of the union, users can only create profile objects covering one dimension of attributes (i.e., users can create a scheduling profile, or a CPU affinity profile, but not a profile that covers both). This CL allows profile objects to specify both scheduler parameters and CPU affinity masks by adding new fields outside of the union. Once implemented, existing users of the |zx_profile_create| syscall will be migrated to the new fields, and the old union removed. * Finally, we add a new field to |zx_info_thread_stats| to expose to userspace the most recent CPU a given thread was scheduled on. This allows us in later CLs to test that the kernel is respecting affinity. Other tools, such as "top" may also use these statistics in future. BUG: ZX-3828 Change-Id: I06ecd17add266ba44a1fd2aa0805c9c49e112807
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
See Getting Started.
See the documentation.