Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753999AbbERMaG (ORCPT ); Mon, 18 May 2015 08:30:06 -0400 Received: from mail.emea.novell.com ([130.57.118.101]:52213 "EHLO mail.emea.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753988AbbERM37 (ORCPT ); Mon, 18 May 2015 08:29:59 -0400 Date: Mon, 18 May 2015 14:29:52 +0200 (CEST) From: Jiri Kosina X-X-Sender: jikos@twin.jikos.cz To: Torsten Duwe cc: Michael Ellerman , ppc-dev , Linux Kernel Mailing List Subject: Re: [PATCH] ppc64 ftrace: mark data_access callees "notrace" (pt.1) In-Reply-To: <20150516080534.GA27059@lst.de> Message-ID: References: <20150513161100.GA1619@lst.de> <1431653687.13498.1.camel@ellerman.id.au> <20150515084542.GA20453@suse.de> <20150516080534.GA27059@lst.de> User-Agent: Alpine 2.00 (LRH 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: 862 Lines: 26 yOn Sat, 16 May 2015, Torsten Duwe wrote: > > > There's got to be a better solution than this. > > > > Can you think of a better approach? > > Maybe a per thread variable to lock out a recursion into tracing? > Thanks for your doubt. ftrace already handles recursion protection by itself (depending on the per-ftrace-ops FTRACE_OPS_FL_RECURSION_SAFE flag). It's however not really well-defined what to do when recursion would happen. Therefore __notrace__ annotation, that just completely avoid such situation by making tracing impossible, looks like saner general solution to me. -- 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/