tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: write alignment matters?



On Thu, Jun 23, 2011 at 06:36:31AM -0700, Matt Thomas wrote:
> 
> On Jun 23, 2011, at 4:41 AM, Thor Lancelot Simon wrote:
> 
> > On Thu, Jun 23, 2011 at 03:36:25PM +0700, Robert Elz wrote:
> >>    Date:        Wed, 22 Jun 2011 19:30:55 -0400 (EDT)
> >>    From:        der Mouse <mouse%Rodents-Montreal.ORG@localhost>
> >>    Message-ID:  
> >> <201106222330.TAA28359%Sparkle.Rodents-Montreal.ORG@localhost>
> >> 
> >>  | But the interface is much older than that, and, even if it's not
> >>  | codified, there's a lot of history behind the notion that userland
> >>  | alignment of write() buffers affects, at most, performance, to the
> >>  | point where I consider it part of the interface.
> >> 
> >> Not on access to raw devices it isn't, and never was - what Erik Fair
> >> said (Message-id: 
> >> <5F005E6A-5441-4BEC-BB3C-4A9B79584BFB%netbsd.org@localhost>)
> >> was 100% correct - if you're using a raw device, it is up to the
> >> application to meet whatever the requirements of that particular device
> >> are, because one of the properties of raw devices is that they don't
> >> do any kind of rebuffering of data (and the driver must not - that is
> >> a part of the interface contract).
> > 
> > That doesn't seem like it can really be right.  There are plenty of
> > systems where devices cannot DMA from user addresses.
> 
> Really?  That seems unlikely.  

Any system where some devices have a limited range of DMA addresses
will see this kind of "raw" I/O get bounced, no?  Think of an ISA
SCSI controller.

And then there are weird cases like the pmax where the device can do
DMA but there's a buffer in the middle anyway.

-- 
Thor Lancelot Simon                                    tls%panix.com@localhost
  "All of my opinions are consistent, but I cannot present them all
   at once."    -Jean-Jacques Rousseau, On The Social Contract


Home | Main Index | Thread Index | Old Index