public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: memcpy_toio on i386 using byte writes even when n%2==0
Date: Mon, 29 May 2006 00:38:05 -0700 (PDT)	[thread overview]
Message-ID: <e5e8ct$bl6$1@terminus.zytor.com> (raw)
In-Reply-To: 44779358.9010703@shaw.ca

Followup to:  <44779358.9010703@shaw.ca>
By author:    Robert Hancock <hancockr@shaw.ca>
In newsgroup: linux.dev.kernel
> 
> It does seem a little bit less efficient, but I don't know think it's 
> necessarily a bug. There's no guarantee of what size writes will be used 
> with the memcpy_to/fromio functions.
> 

There are only a few semantics that make sense: fixed 8, 16, 32, or 64
bits, plus "optimal"; the latter to be used for anything that doesn't
require a specific transfer size.  Logically, an unqualified
"memcpy_to/fromio" should be the optimal size (as few transfers as
possible) -- we have a qualified "memcpy_to/fromio32" already, and 8-
and 16-bit variants could/should be added.

However, having the unqualified version do byte transfers seems like a
really bad idea.

	-hpa


  reply	other threads:[~2006-05-29  7:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6gMqr-8uW-23@gated-at.bofh.it>
2006-05-26 23:46 ` memcpy_toio on i386 using byte writes even when n%2==0 Robert Hancock
2006-05-29  7:38   ` H. Peter Anvin [this message]
2006-05-30 13:55   ` Chris Lesiak
2006-05-30 14:24     ` linux-os (Dick Johnson)
     [not found] <6ined-4gY-17@gated-at.bofh.it>
     [not found] ` <6ined-4gY-21@gated-at.bofh.it>
     [not found]   ` <6inee-4gY-23@gated-at.bofh.it>
     [not found]     ` <6ined-4gY-15@gated-at.bofh.it>
     [not found]       ` <6inxv-4U2-17@gated-at.bofh.it>
2006-06-03 23:52         ` Robert Hancock
2006-06-04  0:48           ` H. Peter Anvin
     [not found] <6gUec-3mb-7@gated-at.bofh.it>
     [not found] ` <6gUec-3mb-5@gated-at.bofh.it>
     [not found]   ` <6icVy-56r-9@gated-at.bofh.it>
     [not found]     ` <6idov-5Tc-7@gated-at.bofh.it>
2006-05-31  0:55       ` Robert Hancock
2006-05-31  1:13         ` H. Peter Anvin
2006-05-26 15:29 Chris Lesiak

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='e5e8ct$bl6$1@terminus.zytor.com' \
    --to=hpa@zytor.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