hulk inclusion category: cleanup bugzilla: https://atomgit.com/openeuler/kernel/issues/8423 -------------------------------- This commit cleans up the xsched scheduler core by removing dead, unreferenced, or redundant code that is no longer used in any scheduling path. Signed-off-by: Liu Kai <liukai284@huawei.com> --- include/linux/xsched.h | 16 ---------------- kernel/xsched/cfs.c | 3 --- 2 files changed, 19 deletions(-) diff --git a/include/linux/xsched.h b/include/linux/xsched.h index 3cdef751e89b..16d3bde2dc9b 100644 --- a/include/linux/xsched.h +++ b/include/linux/xsched.h @@ -392,22 +392,6 @@ ctx_find_by_tgid_and_xcu(pid_t tgid, struct xsched_cu *xcu) return ret; } -static inline u64 gcd(u64 a, u64 b) -{ - u64 rem; - - while (a != 0 && b != 0) { - if (a > b) { - div64_u64_rem(a, b, &rem); - a = rem; - } else { - div64_u64_rem(b, a, &rem); - b = rem; - } - } - return (a) ? a : b; -} - struct xsched_class { enum xcu_sched_class class_id; size_t kick_slice; diff --git a/kernel/xsched/cfs.c b/kernel/xsched/cfs.c index 3afb08def14f..aa47f7d9ee94 100644 --- a/kernel/xsched/cfs.c +++ b/kernel/xsched/cfs.c @@ -16,9 +16,6 @@ */ #include <linux/xsched.h> -#define CFS_INNER_RQ_EMPTY(cfs_xse) \ - ((cfs_xse)->xruntime == XSCHED_TIME_INF) - static void xs_rq_add(struct xsched_entity_cfs *xse) { struct xsched_rq_cfs *cfs_rq = xse->cfs_rq; -- 2.34.1