From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030419AbXDKUEE (ORCPT ); Wed, 11 Apr 2007 16:04:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030420AbXDKUED (ORCPT ); Wed, 11 Apr 2007 16:04:03 -0400 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:59897 "EHLO ebiederm.dsl.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030342AbXDKUEA (ORCPT ); Wed, 11 Apr 2007 16:04:00 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Oleg Nesterov Cc: Andrew Morton , Davide Libenzi , Jan Engelhardt , Ingo Molnar , Linus Torvalds , Robin Holt , Roland McGrath , "Serge E. Hallyn" , linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Gautham R Shenoy Subject: Re: [PATCH] kthread: Don't depend on work queues (take 2) References: <20070410185133.GA104@tv-sign.ru> <20070411000316.52f2551e.akpm@linux-foundation.org> <20070411192809.GA106@tv-sign.ru> <20070411194921.GA171@tv-sign.ru> Date: Wed, 11 Apr 2007 14:02:24 -0600 In-Reply-To: <20070411194921.GA171@tv-sign.ru> (Oleg Nesterov's message of "Wed, 11 Apr 2007 23:49:21 +0400") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Oleg Nesterov writes: > Ah yes, we still need to export kthreadd_task... I just worried about subtle > dependency this patch adds... This "kthreadd_task = find_task_by_pid" assumes > that init/main.c:init() takes lock_kernel() before the first kthread_create(). There is a small element of that. Mostly it assumes we are running in the idle thread until we call schedule. Anyway the assumption and the code is out there in the open in the main code path so it is easy to find, and the code works today. At this point I am queuing up patches that kill daemonize. I will be happy to revisit this part once daemonize is gone and the only interesting file is kthread.c Eric