SRF Replacement - Constraints Part
From OMAPpedia
(Difference between revisions)
Anand sawant (Talk | contribs) (→Implementation Schedule) |
Anand sawant (Talk | contribs) (→Implementation Schedule) |
||
| (5 intermediate revisions not shown) | |||
| Line 2: | Line 2: | ||
This wikipage describes the efforts of replacing constraints part of the Shared Resource Framework (SRF). | This wikipage describes the efforts of replacing constraints part of the Shared Resource Framework (SRF). | ||
| + | Here is an overview presentation: [[File: Latency_constraint_summary.ppt]] | ||
==SRF Replacement - Constraints Part== | ==SRF Replacement - Constraints Part== | ||
| Line 131: | Line 132: | ||
| Internally post device latency constraints for review || Vibhore || '''New: ''' 19-Jul '''Old: ''' 12-Jul || Completed || '''19-Jul: ''' Vishwa provided the review comments; '''14-Jul: ''' Delayed as Vibhore is on leave '''07-Jul: ''' None || None | | Internally post device latency constraints for review || Vibhore || '''New: ''' 19-Jul '''Old: ''' 12-Jul || Completed || '''19-Jul: ''' Vishwa provided the review comments; '''14-Jul: ''' Delayed as Vibhore is on leave '''07-Jul: ''' None || None | ||
|- | |- | ||
| - | | Fix review comments, re-validate & post to LO || Vibhore || '''New: ''' 06-Aug '''Old: ''' 28-Jul || | + | | Fix review comments, re-validate & post to LO || Vibhore || '''New: ''' 06-Aug '''Old: ''' 28-Jul || Completed || '''11-Aug: ''' Posted to LO '''04-Aug: ''' Posted to PM domain mailing list & fixing review comments received; validation on OMAP4 is limited due to non-availablity of CORE RET & OFF in OMAP4 till now '''21-Jul: ''' Revalidation on OMAP3 will be done by 23-Jul and on OMAP4 by 28-Jul || None |
| + | |- | ||
| + | | Validate device latency constraints on OMAP4 & post to LO || Vibhore || 30-Sep || Not started || '''11-Aug: ''' Patches are there; they need to be validated on OMAP4 once CORE RET & CORE OFF is supported on OMAP4 || Depends on availability of CORE RET & CORE OFF functionality on OMAP4 | ||
|- | |- | ||
| Implement interrupt latency constraints using PM QoS || Vishwa || '''New: ''' 21-Jul '''Old: ''' 15-Jul || Completed || '''21-Jul: ''' Vishwa has completed the implementation '''14-Jul: ''' Delayed as Vibhore is on leave '''07-Jul: ''' None || None | | Implement interrupt latency constraints using PM QoS || Vishwa || '''New: ''' 21-Jul '''Old: ''' 15-Jul || Completed || '''21-Jul: ''' Vishwa has completed the implementation '''14-Jul: ''' Delayed as Vibhore is on leave '''07-Jul: ''' None || None | ||
| Line 137: | Line 140: | ||
| Post RFC patches for interrupt latency || Vishwa || '''New: ''' 22-Jul, '''Old: ''' 19-Jul, 30-Jun || Completed || '''04-Aug: ''' Submitted to L24.9 '''21-Jul: ''' No major comments expected as the changes are straight forward '''07-Jul: ''' Prioritized the device latency constraint implementation which is new '''02-Jul: ''' Delayed, '''23-Jun: ''' None || None | | Post RFC patches for interrupt latency || Vishwa || '''New: ''' 22-Jul, '''Old: ''' 19-Jul, 30-Jun || Completed || '''04-Aug: ''' Submitted to L24.9 '''21-Jul: ''' No major comments expected as the changes are straight forward '''07-Jul: ''' Prioritized the device latency constraint implementation which is new '''02-Jul: ''' Delayed, '''23-Jun: ''' None || None | ||
|- | |- | ||
| - | | Implement throughput constraints & post RFC patches || Shweta || '''New: ''' | + | | Implement throughput constraints & post RFC patches || Shweta || '''New: ''' 24-Aug '''Old: ''' 13-Aug, 06-Aug 30-Jul, 22-Jul || In progress || '''18-Aug: ''' Posted OMAP3 patches to LO; OMAP4 testing is ongoing - target 24-Aug for posting'''11-Aug: ''' Delayed due more time needed to address the internal review comments received '''04-Aug:''' Posted to internal mailing list; fixing the review comments received. Targeting 06-Aug for posting to LO. Anyway, this feature has a dependency on CORE DVFS '''21-Jul: ''' Basic implementation is done; OMAP3 validation targeted for 23-Jul; OMAP4 validation will start once CORE DVFS with min defconfig is functional on OMAP4 || '''07-Jul: ''' Requires DVFS functionality which is available on OMAP3 today and will be done for OMAP4 by the target date |
|- | |- | ||
| Extensive testing on OMAP3 & OMAP4 and rework to address review comments || Vibhore || '''New: ''' TBD '''Old: '''31-Jul || Not started || '''21-Jul: ''' Needs to be done during PM camp as drivers expressing constraints need to be in place; may happen by Sep end '''23-Jun: ''' None || None | | Extensive testing on OMAP3 & OMAP4 and rework to address review comments || Vibhore || '''New: ''' TBD '''Old: '''31-Jul || Not started || '''21-Jul: ''' Needs to be done during PM camp as drivers expressing constraints need to be in place; may happen by Sep end '''23-Jun: ''' None || None | ||
Latest revision as of 10:22, 18 August 2010
Contents |
[edit] Introduction
This wikipage describes the efforts of replacing constraints part of the Shared Resource Framework (SRF).
Here is an overview presentation: File:Latency constraint summary.ppt
[edit] SRF Replacement - Constraints Part
[edit] Types of Latency Constraints
- Interrupt latency or System latency
- This is the total amount of time taken once an interrupt occurs to the time the interrupt handler is scheduled.
- Depends mainly on the system sleep state or C state.
- Since different C states take different amount of time to wakeup, the interrupt/ system latency constraint actually governs the deepest C state acceptable to the system at any given time.
- Device latency constraint
- This is the total amount of time taken for a device to become accessible.
- It includes turning the clocks on, bringing the clockdomain out of inactive, power domain out of RET or OFF (with context restore) state.
- This constraint mainly governs the deepest device idle state (only clocks cut, clockdomain in inactive, Powerdomain in RET or off) acceptable to the device at any given time.
- Throughput latency constraint
- This constraint can be used to set the minimum L3 rate in the system
[edit] Details of Interrupt Latency
- pm_qos framework (kernel/pm_qos_params.c) already has support for CPU_DMA_LATENCY
- The CPUidle menu governor also looks at CPU_DMA_LATENCY before deciding on the target C state
- The omap-pm apis (omap_pm_set_max_mpu_wakeup_lat and omap_pm_set_max_sdma_lat) and be used to internally update the pm-qos framework which already does use-counting.
- User needs to create a pm_qos handle and this handle is used to identify the device putting the constraint.
- API Details:
- int omap_pm_set_max_mpu_wakeup_lat(struct pm_qos_request_list **qos_request, long t);
- @qos_request: handle for the constraint. The pointer should be initialized to NULL
- @t: maximum MPU wakeup latency in microseconds
- void omap_pm_set_max_sdma_lat(struct pm_qos_request_list **qos_request, long t);
- @qos_request: handle for the constraint. The pointer should be initialized to NULL
- @t: maximum DMA transfer start latency in microseconds
[edit] Details of Device Latency
- When a device is ready to idle, it calls the omap_device_idle api. Today, this turns the clocks off and eventually the clockdomain/powerdomains transition to the respective states.
- Without any device latency constraints in place a device calling omap_device_idle could hit a OFF state.
- The initial proposal is to map device states to various powerdomain states supported.
- The omap-pm api (omap_pm_set_max_dev_wakeup_lat) called by the device will map to a given powerdomain state acceptable to the device.
- This can be implemented by extending the current powerdomain framework to keep track of all the devices in the domain and their acceptable latencies. For each powerdomain, latency information for each state supported will also be needed.
- Implementing the api will involve identifying the powrdomain the device belongs to, determining the lowest acceptable latency among *all* other devices in the powerdomain and then mapping the latency to the target powerdomain state.
- API Details
- int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev, long t);
- @req_dev: struct device * requesting the constraint, or NULL if none
- @dev: struct device * to set the constraint one
- @t: maximum device wakeup latency in microseconds
[edit] Details of throughput constraint
- User can can set the required throughput by using throughput API omap_pm_set_min_bus_tput
- User needs to calculate the throughput based on the usecases requirement.
- throughput is mapped to l3 frequency using the formula l3_freq = (throughput in KB/sec * 1000/4)
- API Details
- void omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r);
- @dev: struct device * requesting the constraint
- @tbus_id: interconnect to operate on (OCP_{INITIATOR,TARGET}_AGENT)
- @r: minimum throughput (in KiB/s)
[edit] Proposed Implementation
- OMAP PM layer - API’s exported to driver are defined here
- Any driver can place constraints
- Designed for existing omap-pm layer
- -1 to release constraint, otherwise 0 or higher (acceptable latency in us)
- We can’t assume that only releasing the constraint will lower power
- Lowering the constraint can still trigger power state change
void omap_pm_set_max_dev_wakeup_lat(struct device *dev, long t)
{
/* existing code */
1. Look for devices’ power domain (multiple step lookup as starting with general device)
2. Use device pointer as identifier for constraint request
if (t == -1)
pwrdm_wakeuplat_release_constraint(pwrdm, dev);
else
pwrdm_wakeuplat_set_constraint (pwrdm, dev, t);
}
- Power domain layer – constraint enforcement/ tracking implemented here
- State change happens by programming next state
- If device is already in low power state, do a wakeup before programming next state
- powerdomain struct extended to capture following:
- Power domain’s wakeup latency for each supported power state
- List header for wakeup latency constraint placed by all devices in this domain; can be defined in powerdomains44
struct powerdomain {
/* existing entries*/
const u32 wakeuplat[NUM_FUNC_PWRST];
static LIST_HEAD(wakeup_lat_constraint_list);
}
static struct powerdomain core_44xx_pwrdm = {
.wakeuplat = {
[FUNC_PWRST_OFF] = 50,
[FUNC_PWRST_OSWR] = 30,
[FUNC_PWRST_CSWR] = 5,
[FUNC_PWRST_ON] = 0,
};
}
- 3 Scenarios: new constraint, update old constraint, or release it
pwrdm_wakeuplat_set_constraint (struct powerdomain *pwrdm, stuct device *dev, long lat_us){
1. If new constraint, add a new entry to wakeup_lat_constraint_list
2. If already existing, update entries’ latency value
3. pwrdm_check_for_state_change (pwrdm)
}
pwrdm_wakeuplat_release_constraint (struct powerdomain *pwrdm, char *lat_dev_name){
1. Remove this devices’ constraint from wakeup_lat_constraint_list
2. pwrdm_check_for_state_change (pwrdm)
}
pwrdm_wakeuplat_update_pwrst (struct powerdomain *pwrdm){
1. min_latency = find_min_wakeup_latency_constraint (pwrdm)
//go through the list for minimum latency value
2. find power state that has latency lower than minimum constraint
3. if (pwrdm->state != new_state)
pwrdm_set_next_pwrst (pwrdm, new_state); // existing function to program next state
}
[edit] Implementation Schedule
Post PM Workshop Deliverables for SRF Replacement - Constraints Part
| Task | Owner | Target Date | State | Status | Comments & Actions |
| Start with the design as aligned in the workshop and implement check for state change function | Vibhore | 25-Jun | Completed | 30-Jun: Completed 23-Jun: On track | None |
| Resolve any compilation issues & test on zoom3 | Vibhore | New: 07-Jul Old: 28-Jun | Completed | 07-Jul: Faced few issues with test code which had to be developed for testing device latency constraints 02-Jul: debugging & functionality testing 23-Jun: None | None |
| Internally post device latency constraints for review | Vibhore | New: 19-Jul Old: 12-Jul | Completed | 19-Jul: Vishwa provided the review comments; 14-Jul: Delayed as Vibhore is on leave 07-Jul: None | None |
| Fix review comments, re-validate & post to LO | Vibhore | New: 06-Aug Old: 28-Jul | Completed | 11-Aug: Posted to LO 04-Aug: Posted to PM domain mailing list & fixing review comments received; validation on OMAP4 is limited due to non-availablity of CORE RET & OFF in OMAP4 till now 21-Jul: Revalidation on OMAP3 will be done by 23-Jul and on OMAP4 by 28-Jul | None |
| Validate device latency constraints on OMAP4 & post to LO | Vibhore | 30-Sep | Not started | 11-Aug: Patches are there; they need to be validated on OMAP4 once CORE RET & CORE OFF is supported on OMAP4 | Depends on availability of CORE RET & CORE OFF functionality on OMAP4 |
| Implement interrupt latency constraints using PM QoS | Vishwa | New: 21-Jul Old: 15-Jul | Completed | 21-Jul: Vishwa has completed the implementation 14-Jul: Delayed as Vibhore is on leave 07-Jul: None | None |
| Post RFC patches for interrupt latency | Vishwa | New: 22-Jul, Old: 19-Jul, 30-Jun | Completed | 04-Aug: Submitted to L24.9 21-Jul: No major comments expected as the changes are straight forward 07-Jul: Prioritized the device latency constraint implementation which is new 02-Jul: Delayed, 23-Jun: None | None |
| Implement throughput constraints & post RFC patches | Shweta | New: 24-Aug Old: 13-Aug, 06-Aug 30-Jul, 22-Jul | In progress | 18-Aug: Posted OMAP3 patches to LO; OMAP4 testing is ongoing - target 24-Aug for posting11-Aug: Delayed due more time needed to address the internal review comments received 04-Aug: Posted to internal mailing list; fixing the review comments received. Targeting 06-Aug for posting to LO. Anyway, this feature has a dependency on CORE DVFS 21-Jul: Basic implementation is done; OMAP3 validation targeted for 23-Jul; OMAP4 validation will start once CORE DVFS with min defconfig is functional on OMAP4 | 07-Jul: Requires DVFS functionality which is available on OMAP3 today and will be done for OMAP4 by the target date |
| Extensive testing on OMAP3 & OMAP4 and rework to address review comments | Vibhore | New: TBD Old: 31-Jul | Not started | 21-Jul: Needs to be done during PM camp as drivers expressing constraints need to be in place; may happen by Sep end 23-Jun: None | None |