[Intel-gfx] [PATCH v3 2/6] cgroup: Introduce task_get_dfl_cgroup()

Tejun Heo tj at kernel.org
Tue Mar 13 20:41:46 UTC 2018


(cc'ing Roman)

Hello,

On Tue, Mar 06, 2018 at 03:46:56PM -0800, Matt Roper wrote:
> +static inline struct cgroup *
> +task_get_dfl_cgroup(struct task_struct *task)
> +{
> +	struct cgroup *cgrp;
> +
> +	mutex_lock(&cgroup_mutex);
> +	cgrp = task_dfl_cgroup(task);
> +	cgroup_get(cgrp);
> +	mutex_unlock(&cgroup_mutex);

Heh, this is super heavy.  Can't we do "rcu, try get, compare &
retry"?

Thanks.

-- 
tejun


More information about the Intel-gfx mailing list