Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755238Ab0GALn6 (ORCPT ); Thu, 1 Jul 2010 07:43:58 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:48068 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754597Ab0GALn4 convert rfc822-to-8bit (ORCPT ); Thu, 1 Jul 2010 07:43:56 -0400 Subject: Re: [PATCH repost] sched: export sched_set/getaffinity to modules From: Peter Zijlstra To: "Michael S. Tsirkin" Cc: Ingo Molnar , Sridhar Samudrala , Tejun Heo , Oleg Nesterov , netdev , lkml , "kvm@vger.kernel.org" , Andrew Morton , Dmitri Vorobiev , Jiri Kosina , Thomas Gleixner , Andi Kleen In-Reply-To: <1277983179.1917.10.camel@laptop> References: <4BFEA434.6080405@kernel.org> <20100527173207.GA21880@redhat.com> <4BFEE216.2070807@kernel.org> <20100528150830.GB21880@redhat.com> <4BFFE742.2060205@kernel.org> <20100530112925.GB27611@redhat.com> <4C02C99D.9070204@kernel.org> <20100624081135.GA937@redhat.com> <1277419551.27868.27.camel@w-sridhar.beaverton.ibm.com> <20100625101022.GA16321@redhat.com> <20100701110708.GA27368@redhat.com> <1277983179.1917.10.camel@laptop> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Thu, 01 Jul 2010 13:43:23 +0200 Message-ID: <1277984603.1917.15.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 944 Lines: 24 On Thu, 2010-07-01 at 13:19 +0200, Peter Zijlstra wrote: > On Thu, 2010-07-01 at 14:07 +0300, Michael S. Tsirkin wrote: > > Author: Sridhar Samudrala > > > > sched: export sched_set/getaffinity to modules > > > > vhost-net driver wants to copy the affinity from the > > owner thread to thread it creates. Export > > sched_set/get affinity to modules to make this possible > > when vhost is built as a module. > Urgh,.. so why again is that a good idea? In particular: - who sets the affinity of the task? - why can't it set the kernel thread's affinity too? - what happens if someone changes the tasks' affinity? So no, I don't think this is a sensible thing to do at all. -- 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/