[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B0CF2D0.90600@klingt.org>
Date: Wed, 25 Nov 2009 10:03:12 +0100
From: Tim Blechmann <tim@...ngt.org>
To: Brian Gerst <brgerst@...il.com>
CC: mingo@...hat.com, hpa@...or.com, paulus@...ba.org, acme@...hat.com,
linux-kernel@...r.kernel.org, fweisbec@...il.com,
a.p.zijlstra@...llo.nl, efault@....de, tglx@...utronix.de, tim@kl
Subject: Re: [tip:sched/core] sched, x86: Optimize branch hint in __switch_to()
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/24/2009 06:28 PM, Brian Gerst wrote:
> On Tue, Nov 24, 2009 at 11:57 AM, tip-bot for Tim Blechmann
> <tim@...ngt.org> wrote:
>> Commit-ID: a3a1de0c34de6f5f8332cd6151c46af7813c0fcb
>> Gitweb: http://git.kernel.org/tip/a3a1de0c34de6f5f8332cd6151c46af7813c0fcb
>> Author: Tim Blechmann <tim@...ngt.org>
>> AuthorDate: Tue, 24 Nov 2009 11:55:15 +0100
>> Committer: Ingo Molnar <mingo@...e.hu>
>> CommitDate: Tue, 24 Nov 2009 12:20:04 +0100
>>
>> sched, x86: Optimize branch hint in __switch_to()
>>
>> Branch hint profiling on my nehalem machine showed 96%
>> incorrect branch hints:
>>
>> 6548732 174664120 96 __switch_to process_64.c
>> 406
>> 6548745 174565593 96 __switch_to process_64.c
>> 410
>>
>> Signed-off-by: Tim Blechmann <tim@...ngt.org>
>> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
>> Cc: Mike Galbraith <efault@....de>
>> Cc: Paul Mackerras <paulus@...ba.org>
>> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
>> Cc: Frederic Weisbecker <fweisbec@...il.com>
>> LKML-Reference: <4B0BBB93.3080307@...ngt.org>
>> Signed-off-by: Ingo Molnar <mingo@...e.hu>
>> ---
>> arch/x86/kernel/process_64.c | 5 ++---
>> 1 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
>> index ad535b6..d9db104 100644
>> --- a/arch/x86/kernel/process_64.c
>> +++ b/arch/x86/kernel/process_64.c
>> @@ -406,11 +406,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
>> * This won't pick up thread selector changes, but I guess that is ok.
>> */
>> savesegment(es, prev->es);
>> - if (unlikely(next->es | prev->es))
>> + if (next->es | prev->es)
>> loadsegment(es, next->es);
>> -
>> savesegment(ds, prev->ds);
>> - if (unlikely(next->ds | prev->ds))
>> + if (next->ds | prev->ds)
>> loadsegment(ds, next->ds);
>>
>>
>
> 64-bit tasks should have %ds and %es set to null selectors. The only
> time they should be different is for 32-bit tasks.
this doesn't seem to be the case on my machine for 96% of the calls ...
i am just running 64bit binaries on this machine, no 32bit programs
(that i know of (ubuntu karmic amd64))
tim
- --
tim@...ngt.org
http://tim.klingt.org
Relying on the government to protect your privacy is like asking a
peeping tom to install your window blinds.
John Perry Barlow
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAksM8s0ACgkQdL+4qsZfVsscjwCffcvQz7/VTtIfH1XXgJ2SxJxT
xWYAnjZ9aBD/OWmroVn68oEKqJZ7Pm3U
=C7kB
-----END PGP SIGNATURE-----
--
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