lkml.org 
[lkml]   [2017]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] rt: Increase/decrease the nr of migratory tasks when enabling/disabling migration
From
Date
On 06/24/2017 08:41 AM, Ingo Molnar wrote:
>> +enum inc_dec_migratory {
>> + DEC_NR_MIGRATORY = -1,
>> + INC_NR_MIGRATORY = 1,
>> +};
>> +
>> +static inline void
>> +inc_dec_nr_migratory(struct task_struct *p, enum inc_dec_migratory id)
>> +{
>> + if (unlikely((p->sched_class == &rt_sched_class ||
>> + p->sched_class == &dl_sched_class) &&
>> + p->nr_cpus_allowed > 1)) {
>> + if (p->sched_class == &rt_sched_class)
>> + task_rq(p)->rt.rt_nr_migratory += id;
>> + else
>> + task_rq(p)->dl.dl_nr_migratory += id;
>> + }
>> +}
> How about just 'long delta', pass in +1 or -1 and do away with the
> inc_dec_migratory complication?

Ack! I am cooking a v2 using a long delta, rather than the
inc_dec_migratory complication (yeah, I exaggerated hehe).

Thanks!

-- Daniel

\
 
 \ /
  Last update: 2017-06-26 14:28    [W:0.130 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site