Re: [PATCH 1/3] kthread: implement probe_kthread_data()

From: Jan Kara
Date: Wed Apr 03 2013 - 05:27:14 EST


On Fri 29-03-13 20:00:45, Tejun Heo wrote:
> Implement probe_kthread_data() which returns kthread_data if
> accessible. The function is equivalent to kthread_data() except that
> the specified @task may not be a kthread or its vfork_done is already
> cleared rendering struct kthread inaccessible. In the former case,
> probe_kthread_data() may return any value. In the latter, NULL.
>
> This will be used to safely print debug information without affecting
> synchronization in the normal paths. Workqueue debug info printing on
> dump_stack() and friends will make use of it.
Thanks for looking into this. Just one typo correction below:

> @@ -122,6 +123,24 @@ void *kthread_data(struct task_struct *task)
> return to_kthread(task)->data;
> }
>
> +/**
> + * probe_kthread_data - speculatively version of kthread_data()
^^^^ speculative

Honza
--
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/