>> +unsigned long get_task_timer_slack(struct task_struct *tsk)
>> +{
>> +    struct cgroup_subsys_state *css;
>> +    struct tslack_cgroup *tslack_cgroup;
>> +    unsigned long ret;
>> +
>> +    rcu_read_lock();
> 
> Did you just remove the odd comment or actually figure out why you
> need rcu_read_lock() here ?
> 

It's necessary to protect against task exiting or task moving between cgroups.

>> +    css = task_subsys_state(tsk, timer_slack_subsys.subsys_id);
>> +    tslack_cgroup = container_of(css, struct tslack_cgroup, css);
>> +    ret = max(tsk->timer_slack_ns, tslack_cgroup->min_slack_ns);
>> +    rcu_read_unlock();
>> +
>> +    return ret;
>> +}
> 
> Otherwise, it's way more palatable than the last one.
> 
> Thanks,
> 
>       tglx
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to