lkml.org 
[lkml]   [2012]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectWork queue questions
From
Hi,

I have one question regarding concurrency managed workqueue. In the
previous kernel versions, I was using
create_singlethread_workqueue("driver_wq") e.g workqueue name is
driver_wq. In my device driver with the latest kernel version, I am
doing the same to have a support in my device driver for previous
kernel versions and new kernel version, I started using
alloc_workqueue (in intention to create single threaded workqueue)
e.g.

wq = alloc_workqueue("driver_wq", WQ_UNBOUND,1);

create_singlethread_workqueue (Depricated) and alloc_workqueue creates
work queue both work on the newer kernel versions.

I have created 3 single threaded workqueues. when I do ps on linux
console, I see the workqueue thread with process id. When I am queuing
the work simultaneously on these worker threads, I found that threads
named with Kworker/X.Y will process the work from the work queue not
the one that had been created create_singlethread_workqueue.

When I schedule the three works at the same time, I saw sometimes one
Kworker/X.Y thread processes all work items.

The question is why the main worker thread that I created does not
process the work that is intended for it why instead kworker will
process it? I have queued the work using queue_work(wq,
worker_struct).

Regards,
Deepa


\
 
 \ /
  Last update: 2012-09-21 20:21    [W:0.101 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site