[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1173227582.4644.74.camel@localhost.localdomain>
Date: Wed, 07 Mar 2007 11:33:02 +1100
From: Rusty Russell <rusty@...tcorp.com.au>
To: Andi Kleen <ak@...e.de>
Cc: lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
Zachary Amsden <zach@...are.com>,
Jeremy Fitzhardinge <jeremy@...source.com>,
Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 8/8] Convert PDA into the percpu section
On Tue, 2007-03-06 at 20:34 +0100, Andi Kleen wrote:
> Sigh -- i had hoped this had settled down because it was a
> merging nightmare last time. Ok.
Indeed, that's why I waited until everything else was fully merged and
accepted.
> > +#define percpu_to_op(op,var,val) \
> > + do { \
> > + typedef typeof(var) T__; \
> > + if (0) { T__ tmp__; tmp__ = (val); } \
> > + switch (sizeof(var)) { \
> > + case 1: \
> > + asm(op "b %1,"__percpu_seg"%0" \
> > + : "+m" (var) \
> > + :"ri" ((T__)val)); \
>
> Perhaps I'm blind but I can't see where the %fs reference is there.
> How does this work?
Here:
+/* fs segment starts at (positive) offset == __per_cpu_offset[cpu] */
+#define __percpu_seg "%%fs:"
+#else /* !SMP */
+#include <asm-generic/percpu.h>
+#define __percpu_seg ""
+#endif /* SMP */
That's how we get SMP & non-SMP unification in that code.
> Do you have text size comparisons before/after and possible lmbench?
No, but I'll run them this evening. Last time the size reduction was
slight, and there was no measurable performance improvement in
microbenchmarks.
Thanks,
Rusty.
-
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