lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 20 Nov 2008 07:08:58 +0000
From:	"Ohly, Patrick" <patrick.ohly@...el.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"davem@...emloft.net" <davem@...emloft.net>
Subject: RE: [RFC PATCH 10/11] time sync: generic infrastructure to map
 between time stamps generated by a clock source and system time

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 <patrick.ohly@...el.com> 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@...r.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ