mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-08-12 02:21:59 +00:00
domains: Remove TPA sandbox domain for now
At the moment, the scheduler is wasting 50% of its time in an idle thread for the application sandbox domain. Until we can figure out how to use these domains more effectively, we'll reduce to a single domain. Bug: 238811077 Change-Id: If40d01d5c94e31cc8d522dd5f906f857e363cc42 GitOrigin-RevId: 911f6fe046c61b8ce7e9ba00f8de0ec872997ec3
This commit is contained in:
parent
1b0f694aaf
commit
c8e27dab0a
@ -292,8 +292,8 @@ impl seL4BundleImpl {
|
|||||||
cap_tcb: CSpaceSlot::new(), // Top-level dup for suspend/resume
|
cap_tcb: CSpaceSlot::new(), // Top-level dup for suspend/resume
|
||||||
first_page: first_vaddr / PAGE_SIZE,
|
first_page: first_vaddr / PAGE_SIZE,
|
||||||
|
|
||||||
affinity: 0, // CPU 0
|
affinity: 0, // CPU 0
|
||||||
domain: Domain::AppSandbox,
|
domain: Domain::System, // TODO(jtgans,sleffler): Figure out how to use this correctly. b/238811077
|
||||||
|
|
||||||
tcb_name: bundle.app_id.clone(),
|
tcb_name: bundle.app_id.clone(),
|
||||||
tcb_max_priority: 254, // TODO(sleffler): guess
|
tcb_max_priority: 254, // TODO(sleffler): guess
|
||||||
|
@ -4,11 +4,14 @@
|
|||||||
|
|
||||||
/// Scheduling domains configured for seL4 TCBs.
|
/// Scheduling domains configured for seL4 TCBs.
|
||||||
///
|
///
|
||||||
/// Currently we have this setup as a pair of domains, one for the system
|
/// Currently we have this setup as a single domain for all components, since we
|
||||||
/// components and another for the third party application sandbox.
|
/// don't want to waste 50% of our time waiting for a mostly idle partition.
|
||||||
|
///
|
||||||
|
/// TODO: Figure out how to more effectively use these domains of execution, and
|
||||||
|
/// how to prevent wasting time in an idle thread for a whole domain when no
|
||||||
|
/// TCBs are scheduled there. See also b/238811077.
|
||||||
///
|
///
|
||||||
#[derive(Debug, Eq, PartialEq, Copy, Clone)]
|
#[derive(Debug, Eq, PartialEq, Copy, Clone)]
|
||||||
pub enum Domain {
|
pub enum Domain {
|
||||||
System = 0,
|
System = 0,
|
||||||
AppSandbox,
|
|
||||||
}
|
}
|
||||||
|
@ -14,5 +14,5 @@ set(SIMULATION ON CACHE BOOL "Whether to build simulate script")
|
|||||||
set(RELEASE OFF CACHE BOOL "Performance optimized build")
|
set(RELEASE OFF CACHE BOOL "Performance optimized build")
|
||||||
set(UseRiscVBBL OFF CACHE BOOL "Whether to use bbl")
|
set(UseRiscVBBL OFF CACHE BOOL "Whether to use bbl")
|
||||||
|
|
||||||
set(KernelNumDomains 2 CACHE STRING "How many scheduling domains to build for")
|
set(KernelNumDomains 1 CACHE STRING "How many scheduling domains to build for")
|
||||||
set(KernelDomainSchedule "${CMAKE_CURRENT_LIST_DIR}/kernel/round_robin_domain.c" CACHE INTERNAL "Domain scheduler algorithm")
|
set(KernelDomainSchedule "${CMAKE_CURRENT_LIST_DIR}/kernel/round_robin_domain.c" CACHE INTERNAL "Domain scheduler algorithm")
|
||||||
|
@ -13,10 +13,19 @@
|
|||||||
* other half. Note that even if there's nothing to run in the third-party
|
* other half. Note that even if there's nothing to run in the third-party
|
||||||
* application domain, the scheduler will schedule an idle thread to ensure that
|
* application domain, the scheduler will schedule an idle thread to ensure that
|
||||||
* domain gets it's allocated share of time.
|
* domain gets it's allocated share of time.
|
||||||
|
*
|
||||||
|
* TODO(jtgans,sleffler): Figure out how to better use these domains for
|
||||||
|
* scheduling applications. We don't really want to use a full 50% duty cycle
|
||||||
|
* for third party applications -- this wastes too much time. See also
|
||||||
|
* b/238811077.
|
||||||
|
*
|
||||||
|
* NOTE: Only a single domain is currently enabled, as per the commented section
|
||||||
|
* below. Any time the below schedule is changed, the number of domains
|
||||||
|
* configured in easy-settings.cmake must also be changed.
|
||||||
*/
|
*/
|
||||||
const dschedule_t ksDomSchedule[] = {
|
const dschedule_t ksDomSchedule[] = {
|
||||||
{.domain = 0, .length = 1}, // System domain
|
{.domain = 0, .length = 1}, // System domain
|
||||||
{.domain = 1, .length = 1}, // Third party application domain
|
/* {.domain = 1, .length = 1}, // Third party application domain */
|
||||||
};
|
};
|
||||||
|
|
||||||
const word_t ksDomScheduleLength = sizeof(ksDomSchedule) / sizeof(dschedule_t);
|
const word_t ksDomScheduleLength = sizeof(ksDomSchedule) / sizeof(dschedule_t);
|
||||||
|
Loading…
Reference in New Issue
Block a user