Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754254AbYKTHJX (ORCPT ); Thu, 20 Nov 2008 02:09:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753275AbYKTHJI (ORCPT ); Thu, 20 Nov 2008 02:09:08 -0500 Received: from mga11.intel.com ([192.55.52.93]:39663 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752881AbYKTHJH convert rfc822-to-8bit (ORCPT ); Thu, 20 Nov 2008 02:09:07 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.33,638,1220252400"; d="scan'208";a="641413997" From: "Ohly, Patrick" To: Andrew Morton CC: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "davem@davemloft.net" Date: Thu, 20 Nov 2008 07:08:58 +0000 Subject: RE: [RFC PATCH 10/11] time sync: generic infrastructure to map between time stamps generated by a clock source and system time Thread-Topic: [RFC PATCH 10/11] time sync: generic infrastructure to map between time stamps generated by a clock source and system time Thread-Index: AclKrWbHhbnf4/5IRe+S5LyVeGg/CQAL/QIg Message-ID: <5B860B0D7BC1B74498C0C6D8C6E39A4F1E3E8438@irsmsx503.ger.corp.intel.com> References: <1227096528-24150-1-git-send-email-patrick.ohly@intel.com> <1227096528-24150-2-git-send-email-patrick.ohly@intel.com> <1227096528-24150-3-git-send-email-patrick.ohly@intel.com> <1227096528-24150-4-git-send-email-patrick.ohly@intel.com> <1227096528-24150-5-git-send-email-patrick.ohly@intel.com> <1227096528-24150-6-git-send-email-patrick.ohly@intel.com> <1227096528-24150-7-git-send-email-patrick.ohly@intel.com> <1227096528-24150-8-git-send-email-patrick.ohly@intel.com> <1227096528-24150-9-git-send-email-patrick.ohly@intel.com> <1227096528-24150-10-git-send-email-patrick.ohly@intel.com> <1227096528-24150-11-git-send-email-patrick.ohly@intel.com> <20081119171445.bd02498e.akpm@linux-foundation.org> In-Reply-To: <20081119171445.bd02498e.akpm@linux-foundation.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1348 Lines: 43 Andrew wrote: > These patcehs add a lot of quite large inlined functions. Right, I'll need to clean this up once it is clear which code is really going to be needed. > On Wed, 19 Nov 2008 13:08:47 +0100 > Patrick Ohly wrote: > > > +static inline void clocksync_update(struct clocksync *sync, > > + u64 hwtstamp) > > +{ > > + s64 offset; > > + u64 average_time; > > + > > + if (hwtstamp && > > + (s64)(hwtstamp - sync->last_update) < NSEC_PER_SEC) > > + return; > > + In this example, the check is going to avoid a function call when inlined in most of the cases. This was the motivation for making the function inline in the first place. The rest of it should be split of into a non-inline helper function. A "likely()" should be added, too. > The token '/**' is used exclusively to introduce kerneldoc-formatted > comments. Please check the patches for comments which are incorrectly > thus-tagged. Sorry for that, will do. Old habits die hard. > Please cc linux-api@vger.kernel.org on patches which affect the > kernel's userspace interfaces. Okay. Bye, Patrick -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/