[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080310193804.GB5727@cs181133002.pp.htv.fi>
Date: Mon, 10 Mar 2008 21:38:04 +0200
From: Adrian Bunk <bunk@...nel.org>
To: Pavel Machek <pavel@....cz>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [GIT pull] time(r) fixes for .25
On Mon, Mar 10, 2008 at 05:44:07PM +0100, Pavel Machek wrote:
>
> > @@ -174,6 +174,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
> > {
> > ns += a->tv_nsec;
> > while(unlikely(ns >= NSEC_PER_SEC)) {
> > + /* The following asm() prevents the compiler from
> > + * optimising this loop into a modulo operation. */
> > + asm("" : "+r"(ns));
> > +
>
> optimizing -> pessimizing or "optimizing" or explain that "optimized"
> version is slower than real version?
>...
In this case it's actually gcc's fault to ignore the unlikely(), so the
optimization would have made the code slower at least on some
architectures.
But more important, it resulted in build errors on i386 and some other
32bit architectures.
The underlying (and unresolved) issue is that gcc expects libgcc to be
available while the kernel does not link with libgcc on many platforms.
> Pavel
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
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