lkml.org 
[lkml]   [2015]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ring-buffer: More precise time stamps for nested writes
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" <warrier@linux.vnet.ibm.com> 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.



\
 
 \ /
  Last update: 2015-03-27 23:41    [W:2.155 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site