Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752051AbbESD1M (ORCPT ); Mon, 18 May 2015 23:27:12 -0400 Received: from ozlabs.org ([103.22.144.67]:58470 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750787AbbESD1J (ORCPT ); Mon, 18 May 2015 23:27:09 -0400 Message-ID: <1432006027.8339.3.camel@ellerman.id.au> Subject: Re: [PATCH] ppc64 ftrace: mark data_access callees "notrace" (pt.1) From: Michael Ellerman To: Jiri Kosina Cc: Torsten Duwe , ppc-dev , Linux Kernel Mailing List Date: Tue, 19 May 2015 13:27:07 +1000 In-Reply-To: References: <20150513161100.GA1619@lst.de> <1431653687.13498.1.camel@ellerman.id.au> <20150515084542.GA20453@suse.de> <20150516080534.GA27059@lst.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1139 Lines: 32 On Mon, 2015-05-18 at 14:29 +0200, Jiri Kosina wrote: > 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). OK, so I wonder why that's not working for us? > 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. I disagree. Correctly annotating all functions that might be called ever and for all time is a maintenance nightmare and is never going to work in the long term. cheers -- 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/