On 6/25/07, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
I thought of differentiating using affinity setting,but one can set the affinity for kerel threads too(right??), then how can I differentiate b/w kernel threads and per-cpu threads.
Hi...
> I have task_struct of one process and I need to find out whether that
> process is a kernel thread(like pdflush etc) or Per-CPU kernel thread
> like(like migration/0 or migration/1). Is there any way to do that??
I think you can check the atrributes in task_struct that leads to
affinity setting. Another way is by parsing "comm" attribute and see
if it contains numbers (0,1, and so on) :)
I thought of differentiating using affinity setting,but one can set the affinity for kerel threads too(right??), then how can I differentiate b/w kernel threads and per-cpu threads.
regards,
Mulyadi
--
============================
Thanks
Srinivas DS
===========================