Thread (10 messages) 10 messages, 5 authors, 2011-03-04

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

From: Li Zefan <hidden>
Date: 2011-03-03 06:57:34
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help