Make queues in kernel space
shhuiw
shhuiw at 163.com
Wed Jul 9 19:26:47 EDT 2014
The words say:
...
230 @max_active:
231
232 @max_active determines the maximum number of execution contexts per
233 CPU which can be assigned to the work items of a wq. For example,
234 with @max_active of 16, at most 16 work items of the wq can be
235 executing at the same time per CPU.
236
237 Currently, for a bound wq, the maximum limit for @max_active is 512
238 and the default value used when 0 is specified is 256. For an unbound
239 wq, the limit is higher of 512 and 4 * num_possible_cpus(). These
240 values are chosen sufficiently high such that they are not the
241 limiting factor while providing protection in runaway cases.
242
243 The number of active work items of a wq is usually regulated by the
244 users of the wq, more specifically, by how many work items the users
245 may queue at the same time. Unless there is a specific need for
246 throttling the number of active work items, specifying '0' is
247 recommended.
248
249 Some users depend on the strict execution ordering of ST wq. The
250 combination of @max_active of 1 and WQ_UNBOUND is used to achieve this
251 behavior. Work items on such wq are always queued to the unbound
252 worker-pools and only one work item can be active at any given time thus
253 achieving the same ordering property as ST wq.
And through http://lxr.oss.org.cn/search?string=alloc_workqueue, we can see that
most used the default length config.
--
Regards,
shhuiw
At 2014-07-09 07:45:00, "Robert Clove" <cloverobert at gmail.com> wrote:
Thanks for the reply ...
Can you state one more thing is there any limitation on size of queue in kernel?
Regards
Clove
On Sat, Jul 5, 2014 at 4:32 PM, shhuiw <shhuiw at 163.com> wrote:
Hope this article can help:
kernel-src/Documentation/workqueue.txt
At 2014-07-04 04:34:03, "Freeman Zhang" <freeman.zhang1992 at gmail.com> wrote:
Hi,
On 2014-07-04 13:50, Robert Clove wrote:
Hi All,
How we create queues in kernel space and what are the size limit ?
Regards
That should be kfifo. Check this:
http://thelinuxdesk.com/tag/linux-kernel-queue/
Hope this can help :D
All the best!
Freeman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140710/eb9fedf5/attachment.html
More information about the Kernelnewbies
mailing list