public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>,
	Hugh Dickins <hugh@veritas.com>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	alan@lxorguk.ukuu.org.uk, rjw@sisk.pl
Subject: Re: [PATCH] libata-sff: fix 32-bit PIO regression
Date: Sun, 08 Feb 2009 19:19:07 -0500	[thread overview]
Message-ID: <498F767B.9060701@pobox.com> (raw)
In-Reply-To: <498F72C8.8020204@ru.mvista.com>

Sergei Shtylyov wrote:
>   Do you really think that the transfers having lengths non-divisible by 
> 4 make any *significant* percentage even on the ATAPI devices? I think 
> it's you who is really wrong.

The answer depends on workload.  Though rare, workloads do exist that 
involve a lot of oddball querying via weird, vendor-specific SCSI[-ish] 
commands.

Moreover, the likelihood and cost of a branch mispredict are both low in 
this case, IMO.

Or a more human version of the rule:  if you have to have a long email 
thread about unlikely() placement, it is best just to avoid using 
unlikely() in that case at all.  Branch prediction units in modern CPUs 
are damned good anyways, and there is always the likelihood that a 
human-placed unlikely() becomes wrong in the future.

Plus the code is more readable without unlikely(), IMO.

	Jeff




  reply	other threads:[~2009-02-09  0:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-08 19:53 [PATCH] libata-sff: fix 32-bit PIO regression Sergei Shtylyov
2009-02-08 20:11 ` Alan Cox
2009-02-08 22:10   ` Sergei Shtylyov
2009-02-08 21:12 ` Hugh Dickins
2009-02-08 22:18   ` Sergei Shtylyov
2009-02-08 23:48     ` Mikael Pettersson
2009-02-09  0:03       ` Sergei Shtylyov
2009-02-09  0:19         ` Jeff Garzik [this message]
2009-02-09 10:43           ` Sergei Shtylyov
2009-02-09 10:56             ` Sergei Shtylyov
2009-02-09  0:07   ` Sergei Shtylyov
2009-02-09 10:22     ` Hugh Dickins
2009-02-09 16:42       ` Sergei Shtylyov
2009-02-09 16:48         ` Sergei Shtylyov
2009-02-09 18:14           ` Hugh Dickins

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=498F767B.9060701@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hugh@veritas.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    --cc=rjw@sisk.pl \
    --cc=sshtylyov@ru.mvista.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox