Re: [PATCH, v7] cgroups: introduce timer slack controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> +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
> 
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux