public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "George Spelvin" <linux@horizon.com>
To: bp@alien8.de, linux@horizon.com
Cc: hpa@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] x86 fixes for 3.11-rc2
Date: 20 Jul 2013 10:47:58 -0400	[thread overview]
Message-ID: <20130720144758.13924.qmail@science.horizon.com> (raw)
In-Reply-To: <20130720132548.GA13759@pd.tnic>

Borislav Petkov <bp@alien8.de> wrote:
> I don't think that matters because this is called only once on suspend.
> Unless the cleaner assembly translates into a palpable speedup, which I
> doubt.

I was thinking about code *size*, actually; I agree that speed is
too small to measure.

Clean code (21 bytes):
  4e:   b9 80 00 00 c0          mov    $0xc0000080,%ecx
  53:   0f 32                   rdmsr  
  55:   0f 30                   wrmsr  
  57:   31 f6                   xor    %esi,%esi
  59:   85 f6                   test   %esi,%esi
  5b:   89 43 14                mov    %eax,0x14(%ebx)
  5e:   89 53 18                mov    %edx,0x18(%ebx)
  61:   75 04                   jne    67 <acpi_suspend_lowlevel+0x67>

Ugly code (50 bytes):
  51:   b9 80 00 00 c0          mov    $0xc0000080,%ecx
  56:   0f 32                   rdmsr  
  58:   31 c9                   xor    %ecx,%ecx
  5a:   89 c6                   mov    %eax,%esi
  5c:   85 c9                   test   %ecx,%ecx
  5e:   89 45 ec                mov    %eax,-0x14(%ebp)
  61:   89 55 f0                mov    %edx,-0x10(%ebp)
  64:   89 73 14                mov    %esi,0x14(%ebx)
  67:   89 53 18                mov    %edx,0x18(%ebx)
  6a:   75 1b                   jne    87 <acpi_suspend_lowlevel+0x87>
  6c:   8b 75 ec                mov    -0x14(%ebp),%esi
  6f:   b9 80 00 00 c0          mov    $0xc0000080,%ecx
  74:   8b 7d f0                mov    -0x10(%ebp),%edi
  77:   89 f0                   mov    %esi,%eax
  79:   89 fa                   mov    %edi,%edx
  7b:   0f 30                   wrmsr  
  7d:   31 c0                   xor    %eax,%eax
  7f:   85 c0                   test   %eax,%eax
  81:   75 04                   jne    87 <acpi_suspend_lowlevel+0x87>


  reply	other threads:[~2013-07-20 14:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-20 12:25 [GIT PULL] x86 fixes for 3.11-rc2 George Spelvin
2013-07-20 13:25 ` Borislav Petkov
2013-07-20 14:47   ` George Spelvin [this message]
2013-07-20 16:55     ` Borislav Petkov
2013-07-21 20:17 ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2013-07-18 22:41 H. Peter Anvin
2013-07-19  0:46 ` Linus Torvalds
2013-07-19  0:49   ` Myklebust, Trond
2013-07-19  0:50   ` H. Peter Anvin
2013-07-19  4:25   ` H. Peter Anvin

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=20130720144758.13924.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=bp@alien8.de \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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