From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751629AbcFXR3K (ORCPT ); Fri, 24 Jun 2016 13:29:10 -0400 Received: from smtprelay0149.hostedemail.com ([216.40.44.149]:56232 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751337AbcFXR3I (ORCPT ); Fri, 24 Jun 2016 13:29:08 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3870:3871:3872:3873:3874:4321:5007:6261:7875:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12296:12438:12517:12519:12555:12740:13069:13311:13357:13439:14096:14097:14181:14659:14721:21080:30012:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: fruit63_325b0e45bf25e X-Filterd-Recvd-Size: 2728 Date: Fri, 24 Jun 2016 13:29:04 -0400 From: Steven Rostedt To: Namhyung Kim Cc: Ingo Molnar , LKML , "linux-arch@vger.kernel.org" Subject: Re: [RFC/PATCH] ftrace: Reduce size of function graph entries Message-ID: <20160624132904.1a94c0fc@gandalf.local.home> In-Reply-To: <20160624161534.GA29064@danjae.aot.lge.com> References: <1463930775-12214-1-git-send-email-namhyung@kernel.org> <20160623093740.638579af@gandalf.local.home> <20160624063543.GA1607@sejong> <20160624120440.3961bb05@gandalf.local.home> <20160624161534.GA29064@danjae.aot.lge.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 25 Jun 2016 01:15:34 +0900 Namhyung Kim 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 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