linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Jan Beulich <JBeulich@suse.com>,
	tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com
Subject: Re: [tip:x86/asm] x86: Prefer TZCNT over BFS
Date: Mon, 17 Sep 2012 10:00:28 -0700	[thread overview]
Message-ID: <CA+55aFwKkW7+Xv4-36JsbR7rDyorC8xcTsL_XnYCq=XNTZeJFw@mail.gmail.com> (raw)
In-Reply-To: <20120917100046.GA32463@gmail.com>

On Mon, Sep 17, 2012 at 3:00 AM, Ingo Molnar <mingo@kernel.org> wrote:
>
> Linus's suggestion is to introduce CONFIG_X86_TZCNT as an add-on
> patch that cleans up and documents what this is all about.
>
> Would you be willing to do such a patch?

As Jan already pointed out, I really want more than that.

The *conditions* for selecting X86_TZCNT have to be sane too.

I really think that "32-bit generic kernel" is totally and completely
a wrong choice for enabling this. A 32-bit setup has exactly two
relevant cases:

 - old CPU's that don't support TZCNT anyway
 - new CPU's where the user doesn't care about performance (things
like HIGHMEM will have killed it much more than TZCNT etc ever will)

and in neither case is the TZCNT instruction relevant.

Even for the 64-bit case, I really don't see why "generic" should pick
it up either. The fact that we don't have many CPU optimization
choices for x86-64 is not an excuse to then overload "generic" with
that kind of choice, I think.

So I really objected not only to the ugly and unreadable conditionals,
I objected to the criteria for them too.

            Linus

  parent reply	other threads:[~2012-09-17 17:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10 11:24 [PATCH] x86: prefer tzcnt over bsf Jan Beulich
2012-09-14  6:23 ` [tip:x86/asm] x86: Prefer TZCNT over BFS tip-bot for Jan Beulich
2012-09-14 21:14   ` Linus Torvalds
2012-09-14 21:32     ` Borislav Petkov
2012-09-17  7:41     ` Jan Beulich
2012-09-17 10:00       ` Ingo Molnar
2012-09-17 10:58         ` Jan Beulich
2012-09-17 17:00         ` Linus Torvalds [this message]
2012-09-17 17:05           ` H. Peter Anvin
2012-09-17 17:13             ` Linus Torvalds
2012-09-18  6:40             ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+55aFwKkW7+Xv4-36JsbR7rDyorC8xcTsL_XnYCq=XNTZeJFw@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=JBeulich@suse.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).