From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751679AbdBHU4N (ORCPT ); Wed, 8 Feb 2017 15:56:13 -0500 Received: from mga11.intel.com ([192.55.52.93]:18508 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751040AbdBHU4L (ORCPT ); Wed, 8 Feb 2017 15:56:11 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,348,1484035200"; d="scan'208";a="1123937512" Message-ID: <1486587348.2871.15.camel@tzanussi-mobl.amr.corp.intel.com> Subject: Re: [RFC][PATCH 03/21] ring-buffer: Add TIME_EXTEND_ABS ring buffer type From: Tom Zanussi To: Steven Rostedt Cc: tglx@linutronix.de, mhiramat@kernel.org, namhyung@kernel.org, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Date: Wed, 08 Feb 2017 14:55:48 -0600 In-Reply-To: <20170208153200.38be2965@gandalf.local.home> References: <20170208153200.38be2965@gandalf.local.home> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) 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 On Wed, 2017-02-08 at 15:32 -0500, Steven Rostedt wrote: > On Wed, 8 Feb 2017 11:24:59 -0600 > Tom Zanussi wrote: > ... > > /* > > * The event first in the commit queue updates the > > * time stamp. > > @@ -2492,8 +2516,7 @@ static inline void rb_event_discard(struct ring_buffer_event *event) > > delta <<= TS_SHIFT; > > delta += event->time_delta; > > cpu_buffer->write_stamp += delta; > > - } else > > - cpu_buffer->write_stamp += event->time_delta; > > + } > > And why is this removed? > Yeah, it doesn't make sense, given that we've returned already. Looks like it was just a lineo.. > > } > > } > > > > @@ -2674,7 +2697,7 @@ int ring_buffer_unlock_commit(struct ring_buffer *buffer, > > * If this is the first commit on the page, then it has the same > > * timestamp as the page itself. > > */ > > - if (!tail) > > + if (!tail && !ring_buffer_time_stamp_abs(cpu_buffer->buffer)) > > info->delta = 0; > > > > /* See if we shot pass the end of this buffer page */ > > @@ -2752,8 +2775,11 @@ int ring_buffer_unlock_commit(struct ring_buffer *buffer, > > /* make sure this diff is calculated here */ > > barrier(); > > > > - /* Did the write stamp get updated already? */ > > - if (likely(info.ts >= cpu_buffer->write_stamp)) { > > + if (ring_buffer_time_stamp_abs(buffer)) { > > + info.delta = info.ts; > > + rb_handle_timestamp(cpu_buffer, &info); > > + } else /* Did the write stamp get updated already? */ > > + if (likely(info.ts >= cpu_buffer->write_stamp)) { > > OK, please break this patch up into two. Although, I may take it and > start on it as well ;-) One with the implementation of the EXTEND_ABS, > and the other with the setting of the flags. > OK, I'll break it up if I don't see you do anything with it in the meantime.. Tom