Skip to content

Commit

Permalink
RDB: fix #29, and set sysctl_sched_migration_cost default to 750000UL
Browse files Browse the repository at this point in the history
  • Loading branch information
hamadmarri authored and xanmod committed Apr 7, 2021
1 parent 897a51f commit 4aea9b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions include/linux/sched/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ extern unsigned int sysctl_numa_balancing_scan_period_min;
extern unsigned int sysctl_numa_balancing_scan_period_max;
extern unsigned int sysctl_numa_balancing_scan_size;

#ifdef CONFIG_CACULE_RDB
#ifdef CONFIG_SCHED_DEBUG
extern __read_mostly unsigned int sysctl_sched_migration_cost;
#else
#elif CONFIG_CACULE_RDB
extern unsigned int sysctl_sched_migration_cost;
#endif
#endif

#ifdef CONFIG_SCHED_DEBUG
extern __read_mostly unsigned int sysctl_sched_nr_migrate;
Expand Down
6 changes: 3 additions & 3 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ static unsigned int normalized_sysctl_sched_wakeup_granularity = 1000000UL;

#ifdef CONFIG_CACULE_RDB
#ifdef CONFIG_SCHED_DEBUG
const_debug unsigned int sysctl_sched_migration_cost = 100000UL;
const_debug unsigned int sysctl_sched_migration_cost = 750000UL;
#else
unsigned int sysctl_sched_migration_cost = 100000UL;
unsigned int sysctl_sched_migration_cost = 750000UL;
#endif
#else
const_debug unsigned int sysctl_sched_migration_cost = 500000UL;
Expand Down Expand Up @@ -7915,7 +7915,7 @@ static int task_hot(struct rq *src_rq)
if (sysctl_sched_migration_cost == 0)
return 0;

delta = rq_clock_task(src_rq) - p->se.exec_start;
delta = sched_clock() - p->se.exec_start;

return delta < (s64)sysctl_sched_migration_cost;
}
Expand Down

0 comments on commit 4aea9b1

Please sign in to comment.