Re: memcpy to PCI Adapter Memory
From: Stephan Wolf [MVP] (stewo68_at_hotmail.com)
Date: 07/02/04
- Next message: Pavel A.: "Re: Pnp notification issue"
- Previous message: Christian Sturt: "MDL/ GetScatterGatherList problems."
- In reply to: cd: "Re: memcpy to PCI Adapter Memory"
- Next in thread: cd: "Re: memcpy to PCI Adapter Memory"
- Reply: cd: "Re: memcpy to PCI Adapter Memory"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 02 Jul 2004 16:18:46 +0200
IIRC, REP MOVSD on 80386 showed completely different performance
results depending on the alignment of the source and destination
memory addresses, i.e. (E)SI and (E)DI. Don't know if later CPUs still
show this behaviour. I thus always dword align the destination before
REP MOVSD in assembler code (which I don't use very often anymore
these days).
Also, I guess RtlCopyMemory() is actually implemented in the HAL. Not
sure, though.
I was hoping someone with more insight into this would jump in here...
Stephan
--- On Fri, 02 Jul 2004 12:21:09 GMT, "cd" <cd@junk.com> wrote: >My guess is that byte copy was the easiest thing to do to get it out the >door. Looking at Linux code, some processors have great memcpy_*io support >(i.e. checking for alignment, using largest word size possible), and others >default to the simple byte copy. Even *I* could make a slightly faster model >just by looking for similar alignment on source and destination to use >larger word sizes. This is why a HAL routine to optimize memory moves >to/from IO bus is a must to optimize system performance especially as >processors get so much faster than IO busses. > > >"Stephan Wolf [MVP]" <stewo68@hotmail.com> wrote in message >news:jvaae0duueorjqp0svhucr3hvj53fbqqfh@4ax.com... >> On Thu, 01 Jul 2004 18:24:22 GMT, "cd" <cd@junk.com> wrote: >> >> >Those are either memcpy or byte copies which may not be the most >efficient >> >(especially on RISC architectures). >> >> Exactly. But memcpy() or, in this case, RtlCopyMemory(), for sure uses >> 32-bit or 64-bit memory move instructions on x86 and ia64, >> respectively. >> >> Sorry, but I am not aware of why RtlCopyMemory() cannot be used on >> RISC for mapped memory as the comment in "ndis.h" states. >> >> All I know is that NdisMoveMappedMemory() is probably the best choice >> for *network* drivers, which is my major field of activity. >> >> Stephan
- Next message: Pavel A.: "Re: Pnp notification issue"
- Previous message: Christian Sturt: "MDL/ GetScatterGatherList problems."
- In reply to: cd: "Re: memcpy to PCI Adapter Memory"
- Next in thread: cd: "Re: memcpy to PCI Adapter Memory"
- Reply: cd: "Re: memcpy to PCI Adapter Memory"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|