From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752892AbbC0WOh (ORCPT ); Fri, 27 Mar 2015 18:14:37 -0400 Received: from ozlabs.org ([103.22.144.67]:41184 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbbC0WOf (ORCPT ); Fri, 27 Mar 2015 18:14:35 -0400 Date: Sat, 28 Mar 2015 09:14:30 +1100 From: Paul Mackerras To: Steven Rostedt Cc: "Suresh E. Warrier" , linux-kernel@vger.kernel.org, Frederic Weisbecker , Ingo Molnar Subject: Re: [PATCH] ring-buffer: More precise time stamps for nested writes Message-ID: <20150327221430.GA31309@iris.ozlabs.ibm.com> References: <1426827724-22200-1-git-send-email-warrier@linux.vnet.ibm.com> <5511EECD.90902@linux.vnet.ibm.com> <20150324191928.18b9f9f2@gandalf.local.home> <5514ECE3.6030200@linux.vnet.ibm.com> <20150327120415.15640e4b@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150327120415.15640e4b@gandalf.local.home> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 27, 2015 at 12:04:15PM -0400, Steven Rostedt wrote: > On Fri, 27 Mar 2015 00:38:43 -0500 > "Suresh E. Warrier" wrote: > > > > But for now, what can be done is to have > > > a flag that is set that will implement this or not. Using > > > static_branch() to implement it such that when its off it has no effect. > > > > > > > Are you recommending that for now I use a static_branch() instead > > of a CONFIG option to fix this? I could do that but the resulting > > code will either be messier to read (with several if condition checks) > > or will require some duplication of code. My assumption is that the > > new CONFIG option when disabled should have negligible impact since > > the compiler inlines the functions. > > It can be done cleanly if you encapsulate it properly. Sure, but what is the advantage to using a static branch? When would you ever want a single kernel image that could run either way depending on what machine it was running on? > Too bad I'm not going on any trips soon. This is a project I would work > on on the plane. :) Paul.