Re: [PATCH] x86-64: make pda's cpunumber and nodenumber unsigned

From: Ingo Molnar
Date: Mon Dec 17 2007 - 09:53:45 EST



* Jan Beulich <jbeulich@xxxxxxxxxx> wrote:

> > good catch! Applied your patch to x86.git - queued it up for
> > v2.6.25. I bet there are tons of other instances where we use signed
> > instead of unsigned and get worse code generation.
>
> Yes, definitely. This patch was kind of a testing one whether this is
> a welcome change. As it appears to be, I'll probably produce more as I
> run into respective cases.

they are definitely welcome! Especially when fields are also used in
integer multiplications or divisions then the cost of signedness can be
quite significant. We regularly do such int -> uint sweeps in the
scheduler code and it's a great code size reductor.

Btw., a sidenote: if you are touching files that you care about, and if
you've got a few spare cycles, you might also want to take a look at
checkpatch.pl output:

$ scripts/checkpatch.pl --file include/asm-x86/pda.h
...
total: 23 errors, 1 warnings, 133 lines checked

as it might have a few low hanging fruits ripe for cleanup ;-)

Ingo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/