Patchwork [RFC,5/6] Improvise cgroup interface for classifying jitter from WOF tasks

login
register
mail settings
Submitter Dietmar Eggemann
Date April 11, 2019, 4:01 p.m.
Message ID <52dc3a49-60c0-476f-4a01-c805861458cc@arm.com>
Download mbox | patch
Permalink /patch/770791/
State New
Headers show

Comments

Dietmar Eggemann - April 11, 2019, 4:01 p.m.
On 3/22/19 7:06 AM, Parth Shah wrote:
> Signed-off-by: Parth Shah <parth015@linux.vnet.ibm.com>
> ---
>   kernel/sched/fair.c  | 40 +++++++++++++++++++++++++++++++++++++---
>   kernel/sched/sched.h |  2 ++
>   2 files changed, 39 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 7ecf5ed0b391..c7be5803a37c 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -27,9 +27,15 @@
>   /*
>    * Maintain cpumask to track the core occupying throughput intensive tasks,
>    * which are usually high utilization tasks.
> + *
> + * WOF(Workload Optimized Frequency) tasks are manually classified(task_type=2)

This contradicts with patch 2/6:

>   #define highutil_task_cpu_mask ((struct cpumask *)&__highutil_task_cpu_mask)
> +static struct cpumask __wof_tasks_cpu_mask;
> +#define wof_tasks_cpu_mask ((struct cpumask *)&__wof_tasks_cpu_mask)
>   
>   /*
>    * Targeted preemption latency for CPU-bound tasks:
> @@ -5184,6 +5190,16 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
>   		flags = ENQUEUE_WAKEUP;
>   	}
>   
> +	/*
> +	 * If TurboSched feature is enabled and task is of WOF type(=1)
> +	 * then mark it on the rq
> +	 */
> +	if (turbo_sched_enabled() && p->task_type == 1)

... and with the code here.

[...]
Parth Shah - April 12, 2019, 11:28 a.m.
On 4/11/19 9:31 PM, Dietmar Eggemann wrote:
> On 3/22/19 7:06 AM, Parth Shah wrote:
>> Signed-off-by: Parth Shah <parth015@linux.vnet.ibm.com>
>> ---
>>   kernel/sched/fair.c  | 40 +++++++++++++++++++++++++++++++++++++---
>>   kernel/sched/sched.h |  2 ++
>>   2 files changed, 39 insertions(+), 3 deletions(-)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 7ecf5ed0b391..c7be5803a37c 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -27,9 +27,15 @@
>>   /*
>>    * Maintain cpumask to track the core occupying throughput intensive tasks,
>>    * which are usually high utilization tasks.
>> + *
>> + * WOF(Workload Optimized Frequency) tasks are manually classified(task_type=2)

Good catch. This has to be task_type=1.

Patch

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 903ef29b62c3..be8e8617e0cb 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -604,6 +604,14 @@  struct task_struct {
  	unsigned int			flags;
  	unsigned int			ptrace;

+	/*
+	 * task_characteristics:
+	 * 0 = unknown. Follows regular CFS policy for task placement.
+	 * 1 = Throughput intensive high utilization task
+	 * 2 = Jitter tasks. Should be packed to reduce active core count.
+	 */
+	long long unsigned		task_type;

> + * high utilization tasks which may get benefit of higher frequencies, because
> + * of higher Instructions per seconds metric. >    */
>   static struct cpumask __highutil_task_cpu_mask;