Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752671AbbBMKOJ (ORCPT ); Fri, 13 Feb 2015 05:14:09 -0500 Received: from cantor2.suse.de ([195.135.220.15]:38609 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752509AbbBMKOG (ORCPT ); Fri, 13 Feb 2015 05:14:06 -0500 Date: Fri, 13 Feb 2015 11:14:01 +0100 (CET) From: Jiri Kosina To: Josh Poimboeuf cc: Seth Jennings , Vojtech Pavlik , Masami Hiramatsu , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/9] livepatch: consistency model In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1262 Lines: 30 On Mon, 9 Feb 2015, Josh Poimboeuf wrote: > My biggest concerns and questions related to this patch set are: > > 1) To safely examine the task stacks, the transition code locks each task's rq > struct, which requires using the scheduler's internal rq locking functions. > It seems to work well, but I'm not sure if there's a cleaner way to safely > do stack checking without stop_machine(). How about we take a slightly different aproach -- put a probe (or ftrace) on __switch_to() during a klp transition period, and examine stacktraces for tasks that are just about to start running from there? The only tasks that would not be covered by this would be purely CPU-bound tasks that never schedule. But we are likely in trouble with those anyway, because odds are that non-rescheduling CPU-bound tasks are also RT-priority tasks running on isolated CPUs, which we will fail to handle anyway. I think Masami used similar trick in his kpatch-without-stopmachine aproach. -- Jiri Kosina SUSE Labs -- 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/