PM / devfreq: bimc-bwmon: set a floor_mbps for irq threshold
Interrupt storm happens when bwmon is enabled for GPU. This is mainly due to constant low traffic observed with GPU while doing memory read/write. So as the data rates read from counters are low and so the threshold set for triggering the interrupt also set as low, which in turn causes huge number of interrupts. Avoid this by setting a minimum floor for the irq threshold. Change-Id: I190fad5108bc24afcb67bec5809485380ee3662e Signed-off-by: Hanumath Prasad <hpprasad@codeaurora.org>
This commit is contained in:
parent
c8817de47e
commit
59aaf8f3cb
1 changed files with 8 additions and 1 deletions
|
@ -40,6 +40,13 @@
|
|||
#define MON_MASK(m) ((m)->base + 0x298)
|
||||
#define MON_MATCH(m) ((m)->base + 0x29C)
|
||||
|
||||
/*
|
||||
* Don't set the threshold lower than this value. This helps avoid
|
||||
* threshold IRQs when the traffic is close to zero and even small
|
||||
* changes can exceed the threshold percentage.
|
||||
*/
|
||||
#define FLOOR_MBPS 100UL
|
||||
|
||||
struct bwmon_spec {
|
||||
bool wrap_on_thres;
|
||||
bool overflow;
|
||||
|
@ -195,7 +202,7 @@ static unsigned long meas_bw_and_set_irq(struct bw_hwmon *hw,
|
|||
* multiple times before the IRQ is processed.
|
||||
*/
|
||||
if (likely(!m->spec->wrap_on_thres))
|
||||
limit = mbps_to_bytes(mbps, sample_ms, tol);
|
||||
limit = mbps_to_bytes(max(mbps, FLOOR_MBPS), sample_ms, tol);
|
||||
else
|
||||
limit = mbps_to_bytes(max(mbps, 400UL), sample_ms, tol);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue