<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><br><div>The words say:<br>...<br>230 @max_active:<br>231 <br>232 @max_active determines the maximum number of execution contexts per<br>233 CPU which can be assigned to the work items of a wq. For example,<br>234 with @max_active of 16, at most 16 work items of the wq can be<br>235 executing at the same time per CPU.<br>236 <br>237 Currently, for a bound wq, the maximum limit for @max_active is 512<br>238 and the default value used when 0 is specified is 256. For an unbound<br>239 wq, the limit is higher of 512 and 4 * num_possible_cpus(). These<br>240 values are chosen sufficiently high such that they are not the<br>241 limiting factor while providing protection in runaway cases.<br>242 <br>243 The number of active work items of a wq is usually regulated by the<br>244 users of the wq, more specifically, by how many work items the users<br>245 may queue at the same time. Unless there is a specific need for<br>246 throttling the number of active work items, specifying '0' is<br>247 recommended.<br>248 <br>249 Some users depend on the strict execution ordering of ST wq. The<br>250 combination of @max_active of 1 and WQ_UNBOUND is used to achieve this<br>251 behavior. Work items on such wq are always queued to the unbound<br>252 worker-pools and only one work item can be active at any given time thus<br>253 achieving the same ordering property as ST wq.<br></div><br><div><br>And through <a _src="http://lxr.oss.org.cn/search?string=alloc_workqueue," href="http://lxr.oss.org.cn/search?string=alloc_workqueue,">http://lxr.oss.org.cn/search?string=alloc_workqueue,</a> we can see that<br>most used the default length config. <br></div><br><div>--<br><div>Regards,<br>shhuiw<br></div></div><div id="divNeteaseMailCard"></div><br>At 2014-07-09 07:45:00, "Robert Clove" <cloverobert@gmail.com> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="ltr"><div><div><div>Thanks for the reply ...<br><br></div>Can you state one more thing is there any limitation on size of queue in kernel?<br><br></div>Regards<br></div>Clove<br></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Sat, Jul 5, 2014 at 4:32 PM, shhuiw <span dir="ltr"><<a href="mailto:shhuiw@163.com" target="_blank">shhuiw@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hope this article can help: <br> kernel-src/Documentation/workqueue.txt<br><br></div><div><div class="h5"><div></div><div></div>At 2014-07-04 04:34:03, "Freeman Zhang" <<a href="mailto:freeman.zhang1992@gmail.com" target="_blank">freeman.zhang1992@gmail.com</a>> wrote:<br>
<blockquote style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">
Hi, <br>
<div>On 2014-07-04 13:50, Robert Clove
wrote:<br>
</div>
<blockquote type="cite">Hi All,
<div><br>
</div>
<div>How we create queues in kernel space and what are the size
limit ?</div>
<div><br>
</div>
<div>Regards</div>
<br>
</blockquote>
That should be kfifo. Check this:<br>
<a href="http://thelinuxdesk.com/tag/linux-kernel-queue/" target="_blank">http://thelinuxdesk.com/tag/linux-kernel-queue/</a>
<br>
Hope this can help :D<br>
<br>
<br>
All the best!<br>
Freeman<br>
</blockquote></div></div></div><br><br><span title="neteasefooter"><span></span></span></blockquote></div><br></div>
</blockquote></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>