Skip to content

Commit 7093d75

Browse files
committed
anolis: sched: Credit clarification for BVT and its related work
ANBZ: torvalds#781 Group Identity is a totally different feature from BVT, and the defination and logic of bvt_warp_ns has been totally reformed. While 10 lines of code are related to BVT paper and it's code (Jacob Leverich), this patch gives credit to BVT and its related work. Signed-off-by: Cruz Zhao <CruzZhao@linux.alibaba.com> Signed-off-by: Michael Wang <yun.wang@linux.alibaba.com> Signed-off-by: Shanpei Chen <shanpeic@linux.alibaba.com> Acked-by: Michael Wang <yun.wang@linux.alibaba.com>
1 parent 144056c commit 7093d75

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

kernel/sched/core.c

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7087,7 +7087,30 @@ static struct cftype cpu_legacy_files[] = {
70877087
},
70887088
#endif
70897089
#ifdef CONFIG_GROUP_IDENTITY
7090-
/* legacy bvt interface */
7090+
/* legacy bvt interface
7091+
*
7092+
* BVT(Borrowed Virtual Time) is derived from paper:
7093+
* "Borrowed-virtual-time (BVT) scheduling: supporting
7094+
* latency-sensitive threads in a general-purpose scheduler"
7095+
* Link: https://dl.acm.org/doi/abs/10.1145/319344.319169
7096+
*
7097+
* Jacob Leverich implemented the idea of this paper, and
7098+
* 'bvt_warp_ns' interface is derived from Leverich's code.
7099+
* Link: https://gist.github.com/leverich/5913713.
7100+
*
7101+
* Now we have reformed the whole idea, and only reserved
7102+
* the name of 'bvt_warp_ns' to be compalitible.
7103+
*
7104+
* 'bvt_warp_ns' will be converted into identity when written.
7105+
* The correspondence of bvt_warp_ns and identity follows:
7106+
* bvt identity value identity
7107+
* -2 9 ID_UNDERCLASS | ID_IDLE_SAVER
7108+
* -1 9 ID_UNDERCLASS | ID_IDLE_SAVER
7109+
* 0 0 ID_NORMAL
7110+
* 1 18 ID_HIGHCLASS | ID_IDLE_SEEKER
7111+
* 2 22 ID_HIGHCLASS | ID_IDLE_SEEKER | ID_SMT_EXPELLER
7112+
*
7113+
*/
70917114
{
70927115
.name = "bvt_warp_ns",
70937116
.read_s64 = cpu_bvt_warp_ns_read_s64,

kernel/sched/fair.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL;
112112

113113
#ifdef CONFIG_GROUP_IDENTITY
114114
/*
115+
* Variable 'sysctl_sched_bvt_place_epsilon' is derived from
116+
* https://gist.github.com/leverich/5913713.
117+
* Author: Jacob Leverich
118+
*
115119
* Waking batch tasks are placed sched_bvt_place_epsilon
116120
* nanoseconds relative to min_vruntime.
117121
*
@@ -5290,6 +5294,10 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
52905294

52915295
#ifdef CONFIG_GROUP_ENTITY
52925296
/*
5297+
* The logic of punishing underclass is derived from
5298+
* https://gist.github.com/leverich/5913713.
5299+
* Author: Jacob Leverich
5300+
*
52935301
* The runtime penalty for underclass wakee to make sure
52945302
* they won't interrupt other's execution too much.
52955303
*/

kernel/sysctl.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,11 @@ static struct ctl_table kern_table[] = {
519519
#endif
520520
#ifdef CONFIG_GROUP_IDENTITY
521521
{
522+
/*
523+
* Variable 'sysctl_sched_bvt_place_epsilon' is derived from
524+
* https://gist.github.com/leverich/5913713.
525+
* Author: Jacob Leverich
526+
*/
522527
.procname = "sched_bvt_place_epsilon",
523528
.data = &sysctl_sched_bvt_place_epsilon,
524529
.maxlen = sizeof(unsigned int),

0 commit comments

Comments
 (0)