Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752956AbbBSKvx (ORCPT ); Thu, 19 Feb 2015 05:51:53 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:46444 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752862AbbBSKvv (ORCPT ); Thu, 19 Feb 2015 05:51:51 -0500 Date: Thu, 19 Feb 2015 11:51:41 +0100 From: Peter Zijlstra To: Vojtech Pavlik Cc: Ingo Molnar , Jiri Kosina , Josh Poimboeuf , Ingo Molnar , Masami Hiramatsu , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Seth Jennings Subject: Re: [RFC PATCH 6/9] livepatch: create per-task consistency model Message-ID: <20150219105141.GH5029@twins.programming.kicks-ass.net> References: <2c3d1e685dae5cccc2dfdb1b24c241b2f1c89348.1423499826.git.jpoimboe@redhat.com> <20150212032121.GA18578@treble.redhat.com> <20150212115628.GL2896@worktop.programming.kicks-ass.net> <20150212125149.GB18578@treble.redhat.com> <20150212130817.GV23123@twins.programming.kicks-ass.net> <20150218201755.GA20097@gmail.com> <20150218204444.GA7416@suse.com> <20150219095251.GE5029@twins.programming.kicks-ass.net> <20150219101153.GA8163@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150219101153.GA8163@suse.cz> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1681 Lines: 38 On Thu, Feb 19, 2015 at 11:11:53AM +0100, Vojtech Pavlik wrote: > On Thu, Feb 19, 2015 at 10:52:51AM +0100, Peter Zijlstra wrote: > > kthread_park() functionality seems to be exactly what you want. > > It might be exactly that, indeed. The requrement of not just cleaning > up, but also not using contents of local variables from before parking > would need to be documented. > > And kernel threads would need to start using it, too. I have been able > to find one instance where this functionality is actually used. Yeah, there's work to be done there. It was introduced for the cpu hotplug stuff, and some per-cpu threads use this through the smpboot infrastructure. More need to be converted. It would be relatively straight fwd to park threaded IRQs on irq-suspend like activity for example. > So it is > again a matter of a massive patch adding that, like with the approach of > converting kernel threads to workqueues. Yeah, but not nearly all kthreads can be converted to workqueues. And there is various problems with workqueues that make it undesirable for some even if possible. > By the way, if kthread_park() was implemented all through the kernel, > would we still need the freezer for kernel threads at all? Since parking > seems to be stronger than freezing, it could also be used for that > purpose. I think not; there might of course be horrible exceptions but in general parking should be good enough indeed. -- 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/