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 <j...@suse.cz> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/