Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753199Ab1F3V5t (ORCPT ); Thu, 30 Jun 2011 17:57:49 -0400 Received: from merlin.infradead.org ([205.233.59.134]:56498 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752194Ab1F3V5s convert rfc822-to-8bit (ORCPT ); Thu, 30 Jun 2011 17:57:48 -0400 Subject: Re: [RFC][PATCH] kprobes: Add separate preempt_disabling for kprobes From: Peter Zijlstra To: Steven Rostedt Cc: LKML , Masami Hiramatsu , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Andrew Morton In-Reply-To: <1309449117.26417.90.camel@gandalf.stny.rr.com> References: <1309440213.26417.76.camel@gandalf.stny.rr.com> <1309449117.26417.90.camel@gandalf.stny.rr.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Thu, 30 Jun 2011 23:56:37 +0200 Message-ID: <1309470997.12449.614.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 722 Lines: 18 On Thu, 2011-06-30 at 11:51 -0400, Steven Rostedt wrote: > > To solve this, I've added a per_cpu variable called > kprobe_preempt_disabled, that is set by the kprobe code. If it is set, > the preempt_schedule() will not preempt the code. Damn this is ugly. Can we step back and see if we can make the requirement for kprobe to disable preemption go away? Why does it have to do that anyway? Isn't it keeping enough per-task state to allow preemption over the single step? -- 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/