/* Description: Prints @task's name, cpuset name, and cached copy of its mems_allowed to the kernel log. Must hold task_lock(task) to allow dereferencing task_cs(task).  */
void cpuset_print_task_mems_allowed(struct task_struct *tsk)
/* Description: Prints @task's name, cpuset name, and cached copy of its mems_allowed to the kernel log. Must hold task_lock(task) to allow dereferencing task_cs(task).  */
void cpuset_print_task_mems_allowed(struct task_struct *tsk)
{
	struct dentry *dentry;
	dentry = task_cs(tsk)->css.cgroup->dentry;
	spin_lock(&cpuset_buffer_lock);
	snprintf(cpuset_name, CPUSET_NAME_LEN,
		 dentry ? (const char *)dentry->d_name.name : "/");
	nodelist_scnprintf(cpuset_nodelist, CPUSET_NODELIST_LEN,
			   tsk->mems_allowed);
	printk(KERN_INFO "%s cpuset=%s mems_allowed=%s\n",
	       tsk->comm, cpuset_name, cpuset_nodelist);
	spin_unlock(&cpuset_buffer_lock);
}