Messages in this thread | | | Date | Fri, 14 Mar 2014 13:26:21 +0100 | From | Jan Kara <> | Subject | Re: [PATCH 5/6] printk: Hand over printing to console if printing too long |
| |
On Thu 13-03-14 23:26:36, One Thousand Gnomes wrote: > > Creating yet more kernel threads to solve this problem is a bit sad. > > Is there no way in which we can borrow one of the existing threads? > > schedule_work() > > Surely that's all we need, if we get bunged up for a bit then it ends up > on a work queue item and everyone with a billion disks and a 9600 baud > serial port is still happy. Nobody else will ever see it. Yes, I know about schedule_work() and I've used it about an year (and ~10 patchset iterations) ago when first trying to solve this problem. The problem with using workqueues is that if workqueue code ever does printk() while holding some workqueue lock, we could deadlock when trying to do schedule_work() from printk which might need the same lock. And people were objecting to restricting workqueue code to not call printk(). That's why I've chosen dedicated kthreads were we have tight control over what they do.
Honza -- Jan Kara <jack@suse.cz> SUSE Labs, CR
| |