Date: Sat, 18 Feb 2006 17:04:12 -0500 (EST) From: Andrew Gallatin <gallatin@cs.duke.edu> To: "Joseph Koshy" <joseph.koshy@gmail.com> Cc: freebsd-amd64@freebsd.org Subject: Re: non-temporal copyin/copyout? Message-ID: <17399.39388.956301.439314@grasshopper.cs.duke.edu> In-Reply-To: <84dead720602171920y153bd9d5p1c0aa11cbc177020@mail.gmail.com> References: <17397.58669.457047.277510@grasshopper.cs.duke.edu> <84dead720602170750j119080c9g32ec9f1ac0e3944d@mail.gmail.com> <17397.63064.242130.484086@grasshopper.cs.duke.edu> <84dead720602171920y153bd9d5p1c0aa11cbc177020@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Joseph Koshy writes: > The code in question "/usr/src/sys/amd64/amd64/support.S" has: > 216 ENTRY(copyout) > ... > 249 shrq $3,%rcx > 250 cld > 251 rep > 252 movsq > 253 movb %dl,%cl > 254 andb $7,%cl > 255 rep > 256 movsb > > i.e., it doesn't handle the case where the `from_kernel' > or `to_user' addresses are misaligned to their natural > boundaries. IIRC `rep movsq' works best if both the source > and destination addresses are 8-byte aligned. > > If we are going to use `movntq' then we may as well take > care of alignment issues too. Is this just a matter as adding code to get the bulk of the copy aligned before entering the tight loop? If you can do a patch, I'd be happy to test it. Drew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17399.39388.956301.439314>