Hi Guys,
If you are newbie in Linus Kernel, you may have this doubt that what is the difference between these two methods,basically it is related to the choice that whether you want a dedicated workqueue(which in turn will need dedicated kernel thread) for your driver or you just want to use the default workqueue provided by kernel.
So if you want to control the workfunction in terms of scheduling independently,
you should go for create_workqueue method to create a workqueue. This function will create a workqueue and which in turn will create a seperate Kernel Thread on each and every processor available. Here I would also like to introduce a different version of same method which iscreate_singlethread_workqueue(), you should use this function only when you want to create only a single thread for all the processor.
So if you want to control the workfunction in terms of scheduling independently,
you should go for create_workqueue method to create a workqueue. This function will create a workqueue and which in turn will create a seperate Kernel Thread on each and every processor available. Here I would also like to introduce a different version of same method which iscreate_singlethread_workqueue(), you should use this function only when you want to create only a single thread for all the processor.
No comments:
Post a Comment