All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Borislav Petkov <bp@suse.de>,
	kernel test robot <xiaolong.ye@intel.com>,
	Ville Syrj?l? <ville.syrjala@linux.intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Brian Gerst <brgerst@gmail.com>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	lkp@01.org
Subject: Re: [lkp] [x86/hweight]  65ea11ec6a:  will-it-scale.per_process_ops 9.3% improvement
Date: Wed, 17 Aug 2016 08:48:00 +0200	[thread overview]
Message-ID: <20160817064800.GN30192@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <796A2A72-06B7-4B3D-AA38-DF558FC75857@zytor.com>

On Tue, Aug 16, 2016 at 04:09:19PM -0700, H. Peter Anvin wrote:
> On August 16, 2016 10:16:35 AM PDT, Borislav Petkov <bp@suse.de> wrote:
> >On Tue, Aug 16, 2016 at 09:59:00AM -0700, H. Peter Anvin wrote:
> >> Dang...
> >
> >Isn't 9.3% improvement a good thing(tm) ?
> 
> Yes, it's huge.  The only explanation I could imagine is that scrambling %rdi caused the scheduler to do completely the wrong thing.

Not entirely surprising. We have plenty bitmasks and if hweight is
corrupting the source data instead of computing the weight then we end
up having two bits of wrong information.

After that, all we can do is more wrong of course...

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: lkp@lists.01.org
Subject: Re: [x86/hweight] 65ea11ec6a: will-it-scale.per_process_ops 9.3% improvement
Date: Wed, 17 Aug 2016 08:48:00 +0200	[thread overview]
Message-ID: <20160817064800.GN30192@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <796A2A72-06B7-4B3D-AA38-DF558FC75857@zytor.com>

[-- Attachment #1: Type: text/plain, Size: 653 bytes --]

On Tue, Aug 16, 2016 at 04:09:19PM -0700, H. Peter Anvin wrote:
> On August 16, 2016 10:16:35 AM PDT, Borislav Petkov <bp@suse.de> wrote:
> >On Tue, Aug 16, 2016 at 09:59:00AM -0700, H. Peter Anvin wrote:
> >> Dang...
> >
> >Isn't 9.3% improvement a good thing(tm) ?
> 
> Yes, it's huge.  The only explanation I could imagine is that scrambling %rdi caused the scheduler to do completely the wrong thing.

Not entirely surprising. We have plenty bitmasks and if hweight is
corrupting the source data instead of computing the weight then we end
up having two bits of wrong information.

After that, all we can do is more wrong of course...

  parent reply	other threads:[~2016-08-17  6:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16 14:26 [lkp] [x86/hweight] 65ea11ec6a: will-it-scale.per_process_ops 9.3% improvement kernel test robot
2016-08-16 14:26 ` kernel test robot
2016-08-16 16:59 ` [lkp] " H. Peter Anvin
2016-08-16 17:16   ` Borislav Petkov
2016-08-16 17:16     ` Borislav Petkov
2016-08-16 23:09     ` [lkp] " H. Peter Anvin
2016-08-17  5:46       ` Borislav Petkov
2016-08-17  5:46         ` Borislav Petkov
2016-08-17 22:29         ` [LKP] [lkp] " Huang, Ying
2016-08-17 22:29           ` Huang, Ying
2016-08-18  3:45           ` [LKP] [lkp] " Borislav Petkov
2016-08-18  3:45             ` Borislav Petkov
2016-08-18  3:54             ` [LKP] [lkp] " Huang, Ying
2016-08-18  3:54               ` Huang, Ying
2016-08-18  4:11               ` [LKP] [lkp] " Borislav Petkov
2016-08-18  4:11                 ` Borislav Petkov
2016-08-25  9:22                 ` [LKP] [lkp] " Borislav Petkov
2016-08-25  9:22                   ` Borislav Petkov
2016-08-25 10:05                   ` [LKP] [lkp] " H. Peter Anvin
2016-08-25 11:45                     ` Borislav Petkov
2016-08-25 11:45                       ` Borislav Petkov
2016-08-25 20:07                       ` [LKP] [lkp] " H. Peter Anvin
2016-08-18  3:57             ` H. Peter Anvin
2016-08-17  6:48       ` Peter Zijlstra [this message]
2016-08-17  6:48         ` Peter Zijlstra

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=20160817064800.GN30192@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=ville.syrjala@linux.intel.com \
    --cc=xiaolong.ye@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.