Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756529Ab0GAOgg (ORCPT ); Thu, 1 Jul 2010 10:36:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44871 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756472Ab0GAOge (ORCPT ); Thu, 1 Jul 2010 10:36:34 -0400 Date: Thu, 1 Jul 2010 16:33:26 +0200 From: Oleg Nesterov To: Peter Zijlstra Cc: "Michael S. Tsirkin" , Ingo Molnar , Sridhar Samudrala , Tejun Heo , netdev , lkml , "kvm@vger.kernel.org" , Andrew Morton , Dmitri Vorobiev , Jiri Kosina , Thomas Gleixner , Andi Kleen Subject: Re: [PATCH repost] sched: export sched_set/getaffinity to modules Message-ID: <20100701143325.GA10090@redhat.com> References: <20100625101022.GA16321@redhat.com> <20100701110708.GA27368@redhat.com> <1277983179.1917.10.camel@laptop> <1277984603.1917.15.camel@laptop> <20100701115507.GA31333@redhat.com> <20100701122340.GB31333@redhat.com> <1277987657.1917.32.camel@laptop> <1277988395.1917.47.camel@laptop> <20100701130816.GB32223@redhat.com> <1277991024.1917.108.camel@laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1277991024.1917.108.camel@laptop> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 792 Lines: 21 On 07/01, Peter Zijlstra wrote: > > On Thu, 2010-07-01 at 16:08 +0300, Michael S. Tsirkin wrote: > > Maybe it makes sense to add kthread_clone (in addition to > > kthread_create) that would do what you suggest? > > If yes, any hints on an implementation? > > I think that's called kernel_thread() see > kernel/kthread.c:create_kthread(). Well, strictly speaking kernel_thread() doesn't create the kernel thread. Unless the caller is the kernel thread. And daemonize() is deprecated. kernel_thread() just forks the CLONE_VM + flags child. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/