Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1430826

Re: [RFC/PATCH] ftrace: Reduce size of function graph entries

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [RFC/PATCH] ftrace: Reduce size of function graph entries
Date 2016-06-24 19:30 +0200
Message-ID <rND5v-2Dp-1@gated-at.bofh.it> (permalink)
References <rBDui-2oV-15@gated-at.bofh.it> <rNd1n-2aV-15@gated-at.bofh.it> <rNsWt-4B1-3@gated-at.bofh.it> <rNBQ6-1SP-13@gated-at.bofh.it> <rNBZL-1W6-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 25 Jun 2016 01:15:34 +0900
Namhyung Kim <namhyung@kernel.org> wrote:

> On Fri, Jun 24, 2016 at 12:04:40PM -0400, Steven Rostedt wrote:
> > On Fri, 24 Jun 2016 15:35:44 +0900
> > Namhyung Kim <namhyung@kernel.org> wrote:
> > 
> >   
> > > > > diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> > > > > index dea12a6e413b..35c523ba5c59 100644
> > > > > --- a/include/linux/ftrace.h
> > > > > +++ b/include/linux/ftrace.h
> > > > > @@ -751,25 +751,33 @@ extern void ftrace_init(void);
> > > > >  static inline void ftrace_init(void) { }
> > > > >  #endif
> > > > >  
> > > > > +#ifndef CONFIG_HAVE_64BIT_ALIGNED_ACCESS
> > > > > +# define FTRACE_ALIGNMENT	4
> > > > > +#else
> > > > > +# define FTRACE_ALIGNMENT	8
> > > > > +#endif    
> > > > 
> 
> As far as I can see, the ring buffer has following code in ring_buffer.c:
> 
>   #define RB_ALIGNMENT		4U
>   #define RB_MAX_SMALL_DATA	(RB_ALIGNMENT * RINGBUF_TYPE_DATA_TYPE_LEN_MAX)
>   #define RB_EVNT_MIN_SIZE	8U	/* two 32bit words */
> 
>   #ifndef CONFIG_HAVE_64BIT_ALIGNED_ACCESS
>   # define RB_FORCE_8BYTE_ALIGNMENT	0
>   # define RB_ARCH_ALIGNMENT		RB_ALIGNMENT
>   #else
>   # define RB_FORCE_8BYTE_ALIGNMENT	1
>   # define RB_ARCH_ALIGNMENT		8U
>   #endif
> 
>   #define RB_ALIGN_DATA		__aligned(RB_ARCH_ALIGNMENT)
> 

Right, what I meant was that we should just define FTRACE_ALIGNMENT
unconditionally to 4. If CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set,
it will add the buffered space regardless.

You already moved "overrun", I don't see anything that would be out of
alignment if the structure itself is aligned.

-- Steve

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC/PATCH] ftrace: Reduce size of function graph entries Namhyung Kim <namhyung@kernel.org> - 2016-06-24 08:40 +0200
  Re: [RFC/PATCH] ftrace: Reduce size of function graph entries Steven Rostedt <rostedt@goodmis.org> - 2016-06-24 18:10 +0200
    Re: [RFC/PATCH] ftrace: Reduce size of function graph entries Namhyung Kim <namhyung@kernel.org> - 2016-06-24 18:20 +0200
      Re: [RFC/PATCH] ftrace: Reduce size of function graph entries Steven Rostedt <rostedt@goodmis.org> - 2016-06-24 19:30 +0200
        Re: [RFC/PATCH] ftrace: Reduce size of function graph entries Namhyung Kim <namhyung@kernel.org> - 2016-06-25 05:50 +0200

csiph-web