[lkml]   [2007]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] kthread: Don't depend on work queues
Andrew Morton <> writes:

> argh. Your description freely confuddles the terms "kernel thread" and
> "kthread". Can we not do that? Henceforth the term "kernel thread" refers
> to something which was started with kernel_thread() and "kthread" refers to
> something which was created by kthread_create(), OK?

Yes. Will fix.

> Your patch gets midly tangled up with Oleg's recent
> reduce-reparent_to_init.patch
> make-kernel-threads-invisible-to-sbin-init.patch
> reparent-kernel-threads-to-swapper.patch
> but they seemed fairly unpopular anyway so I'll drop 'em.

Ok. I kind of liked the first one but that is a minor cleanup.

> Your wait_event() will contribute to load average, I expect. We get mail.
> I converted it to wait_event_interruptible().

Ok. That is more polite.

> I guess using PF_NOFREEZE rather than try_to_freeze() is OK, but one
> wonders what thinking led to that?

That is what we are currently doing for the work queues, and I was lazy.
For people who care they can fix it.

> Often when we have a singleton thread like this it is neater to use
> wake_up_process() directly on it, rather than creating a rather pointless
> waitqueue_head for it. I started looking into that but it would have taken
> more than 30 seconds.

Sure I took a look and it isn't too hard. Updated patch in a minute...

I have left the locking the way it is despite the reasonable chance that
Oleg points I can only acquire the lock when deleting the list entry.
I'm to lazy to think through the SMP races to make certain that is safe.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-04-11 20:27    [W:0.106 / U:6.064 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site