quoted
+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.
quoted
+ 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