[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1lkgysrdb.fsf@ebiederm.dsl.xmission.com>
Date: Wed, 11 Apr 2007 12:22:40 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Oleg Nesterov <oleg@...sign.ru>,
Davide Libenzi <davidel@...ilserver.org>,
Jan Engelhardt <jengelh@...ux01.gwdg.de>,
Ingo Molnar <mingo@...e.hu>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Robin Holt <holt@....com>, Roland McGrath <roland@...hat.com>,
"Serge E. Hallyn" <serge@...lyn.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kthread: Don't depend on work queues
Andrew Morton <akpm@...ux-foundation.org> 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.
Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists