[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxtQXmqeo5uNNgy+GLDWbQ5e+cqqc5-qnjds=P-VSCOsQ@mail.gmail.com>
Date: Mon, 24 Sep 2012 09:33:20 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Mel Gorman <mgorman@...e.de>, Borislav Petkov <bp@...en8.de>,
Nikolay Ulyanitsky <lystor@...il.com>,
Mike Galbraith <efault@....de>, linux-kernel@...r.kernel.org,
Andreas Herrmann <andreas.herrmann3@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: 20% performance drop on PostgreSQL 9.2 from kernel 3.5.3 to
3.6-rc5 on AMD chipsets - bisected
On Mon, Sep 24, 2012 at 9:07 AM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> On Mon, 2012-09-24 at 08:52 -0700, Linus Torvalds wrote:
>> Your patch looks odd, though. Why do you use some complex initial
>> value for 'candidate' (nr_cpu_ids) instead of a simple and readable
>> one (-1)?
>
> nr_cpu_ids is the typical no-value value for cpumask operations -- yes
> this is annoying and I keep doing it wrong far too often.
Can we please just fix it? Making the excuse that it's the "typical
no-value" is still stupid, because it's a f*cking moronic no-value.
Whoever thinks that it's smart to test against "nr_cpu_ids" when
there's a much more natural value (-1) is crazy. The source code looks
more complex, but the code it *generates* is clearly more complex and
worse too.
Sure, the "scan bits" bitops will return ">= nr_cpu_ids" for the "I
couldn't find a bit" thing, but that doesn't mean that everything else
should.
Linus
--
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