mirror of
https://github.com/JakeHillion/scx.git
synced 2024-12-01 21:37:12 +00:00
scx_lavd: rename LAVD_MAX_CAS_RETRY to LAVD_MAX_RETRY
Signed-off-by: Changwoo Min <changwoo@igalia.com>
This commit is contained in:
parent
3df7a13117
commit
e081b2a294
@ -54,7 +54,7 @@ enum consts {
|
|||||||
NSEC_PER_MSEC = (1000ULL * NSEC_PER_USEC),
|
NSEC_PER_MSEC = (1000ULL * NSEC_PER_USEC),
|
||||||
LAVD_TIME_ONE_SEC = (1000ULL * NSEC_PER_MSEC),
|
LAVD_TIME_ONE_SEC = (1000ULL * NSEC_PER_MSEC),
|
||||||
LAVD_TIME_INFINITY_NS = SCX_SLICE_INF,
|
LAVD_TIME_INFINITY_NS = SCX_SLICE_INF,
|
||||||
LAVD_MAX_CAS_RETRY = 4,
|
LAVD_MAX_RETRY = 4,
|
||||||
|
|
||||||
LAVD_TARGETED_LATENCY_NS = (15 * NSEC_PER_MSEC),
|
LAVD_TARGETED_LATENCY_NS = (15 * NSEC_PER_MSEC),
|
||||||
LAVD_SLICE_MIN_NS = ( 1 * NSEC_PER_MSEC), /* min time slice */
|
LAVD_SLICE_MIN_NS = ( 1 * NSEC_PER_MSEC), /* min time slice */
|
||||||
|
@ -636,13 +636,13 @@ static void proc_introspec_sched_n(struct task_struct *p,
|
|||||||
cur_nr = intrspc.arg;
|
cur_nr = intrspc.arg;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note that the bounded retry (@LAVD_MAX_CAS_RETRY) does *not
|
* Note that the bounded retry (@LAVD_MAX_RETRY) does *not *guarantee*
|
||||||
* *guarantee* to decrement introspec_arg. However, it is unlikely to
|
* to decrement introspec_arg. However, it is unlikely to happen. Even
|
||||||
* happen. Even if it happens, it is nothing but a matter of delaying a
|
* if it happens, it is nothing but a matter of delaying a message
|
||||||
* message delivery. That's because other threads will try and succeed
|
* delivery. That's because other threads will try and succeed the CAS
|
||||||
* the CAS operation eventually. So this is good enough. ;-)
|
* operation eventually. So this is good enough. ;-)
|
||||||
*/
|
*/
|
||||||
for (i = 0; cur_nr > 0 && i < LAVD_MAX_CAS_RETRY; i++) {
|
for (i = 0; cur_nr > 0 && i < LAVD_MAX_RETRY; i++) {
|
||||||
prev_nr = __sync_val_compare_and_swap(
|
prev_nr = __sync_val_compare_and_swap(
|
||||||
&intrspc.arg, cur_nr, cur_nr - 1);
|
&intrspc.arg, cur_nr, cur_nr - 1);
|
||||||
/* CAS success: submit a message and done */
|
/* CAS success: submit a message and done */
|
||||||
@ -838,7 +838,7 @@ static void collect_sys_stat(struct sys_stat_ctx *c)
|
|||||||
* If the CPU is in an idle state (i.e., idle_start_clk is
|
* If the CPU is in an idle state (i.e., idle_start_clk is
|
||||||
* non-zero), accumulate the current idle peirod so far.
|
* non-zero), accumulate the current idle peirod so far.
|
||||||
*/
|
*/
|
||||||
for (int i = 0; i < LAVD_MAX_CAS_RETRY; i++) {
|
for (int i = 0; i < LAVD_MAX_RETRY; i++) {
|
||||||
u64 old_clk = cpuc->idle_start_clk;
|
u64 old_clk = cpuc->idle_start_clk;
|
||||||
if (old_clk == 0)
|
if (old_clk == 0)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user