lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 17 Nov 2008 20:43:26 +0100
From:	"Alexander van Heukelum" <heukelum@...tmail.fm>
To:	"Cyrill Gorcunov" <gorcunov@...il.com>,
	"Andi Kleen" <andi@...stfloor.org>
Cc:	"Ingo Molnar" <mingo@...e.hu>,
	"LKML" <linux-kernel@...r.kernel.org>,
	"Alexander van Heukelum" <heukelum@...i.uni-sb.de>,
	"Glauber Costa" <gcosta@...hat.com>
Subject: Re: [RFC] x86: save_args out of line

On Mon, 17 Nov 2008 22:22:16 +0300, "Cyrill Gorcunov"
<gorcunov@...il.com> said:
> [Andi Kleen - Mon, Nov 17, 2008 at 07:23:40PM +0100]
> ...
> | 
> | Ok. Hopefully it's worth the effort. The branch misprediction bubble
> | should not be too bad, perhaps it'll make up for the other cycles
> | you're adding. But even if it doesn't decreasing cache line foot print
> is 
> | always a good thing.
> ...
> 
> May I turn in? :)

Sure!

> Original .macro interrupt func has
> 
> 	testl $3, CS(%rdi)
> 	je 1f
> 	SWAPGS
> 1:	incl %gs:pda_irqcount

inc changes flags...

> 	jne 2f
> 	pop %rax
> 	mov %gs:pda_irqstackptr,%rsp
> 	push %rax
> 2:	TRACE_IRQS_OFF
> 
> Wouldn't we help the branch predictor a bit by
> 
> 	testl $3, CS(%rdi)
> 	je 1f
> 	SWAPGS
> 	jne 2f

... so this is not the same.

> 1:	pop %rax
> 	mov %gs:pda_irqstackptr,%rsp
> 	push %rax	
> 2:	incl %gs:pda_irqcount
> 	TRACE_IRQS_OFF
> 
> I hope I didn't miss anything but maybe it's just a churning
> or plain wrong. Don't shoot me :)

I'm sure it helps the branch predictor, though ;).

Alexander

> 		- Cyrill -
-- 
  Alexander van Heukelum
  heukelum@...tmail.fm

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ