Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
techapack/dataipa: ipa_v3: mitigate usleep_range calls
Browse files Browse the repository at this point in the history
Calling usleep_range with identical min and max values,
results in a delta of 0us.

This causes the issue that the scheduler gets no chance to re-use an already
scheduled interrupt for this wait which results in a negative performance
impact by adding uninterruptible sleep.

Fix the issue by allowing the delay to take 20% longer than requested.
This should be good enough for these cases.

Change-Id: I21899ede6ee164d74509f50ad8a02a5a238c5167
Signed-off-by: Alex Naidis <[email protected]>
Signed-off-by: Park Ju Hyung <[email protected]>
Signed-off-by: Vaisakh Murali <[email protected]>
  • Loading branch information
TheCrazyLex authored and mvaisakh committed Jun 5, 2023
1 parent fa57130 commit 5b2846d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion techpack/dataipa/drivers/platform/msm/ipa/ipa_v3/ipa_uc.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ static int ipa3_uc_send_cmd_64b_param(u32 cmd_lo, u32 cmd_hi, u32 opcode,
}
}
usleep_range(IPA_UC_POLL_SLEEP_USEC,
IPA_UC_POLL_SLEEP_USEC);
IPA_UC_POLL_SLEEP_USEC * 1.2);
}

if (index == IPA_UC_POLL_MAX_RETRY) {
Expand Down
4 changes: 2 additions & 2 deletions techpack/dataipa/drivers/platform/msm/ipa/ipa_v3/ipa_uc_wdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2289,7 +2289,7 @@ int ipa3_disable_gsi_wdi_pipe(u32 clnt_hdl)
}
}
usleep_range(IPA_UC_POLL_SLEEP_USEC * IPA_UC_POLL_SLEEP_USEC,
IPA_UC_POLL_SLEEP_USEC * IPA_UC_POLL_SLEEP_USEC);
IPA_UC_POLL_SLEEP_USEC * IPA_UC_POLL_SLEEP_USEC * 1.2);

}

Expand Down Expand Up @@ -2447,7 +2447,7 @@ int ipa3_disable_wdi_pipe(u32 clnt_hdl)
}
}
usleep_range(IPA_UC_POLL_SLEEP_USEC * IPA_UC_POLL_SLEEP_USEC,
IPA_UC_POLL_SLEEP_USEC * IPA_UC_POLL_SLEEP_USEC);
IPA_UC_POLL_SLEEP_USEC * IPA_UC_POLL_SLEEP_USEC * 1.2);

}

Expand Down

0 comments on commit 5b2846d

Please sign in to comment.