From owner-freebsd-amd64@FreeBSD.ORG Sat Feb 18 22:04:19 2006 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D348C16A420 for ; Sat, 18 Feb 2006 22:04:19 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0583243D45 for ; Sat, 18 Feb 2006 22:04:18 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.13.4/8.13.4) with ESMTP id k1IM4IKr005818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 18 Feb 2006 17:04:18 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id k1IM4DCY082204; Sat, 18 Feb 2006 17:04:13 -0500 (EST) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17399.39388.956301.439314@grasshopper.cs.duke.edu> Date: Sat, 18 Feb 2006 17:04:12 -0500 (EST) To: "Joseph Koshy" 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> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Cc: freebsd-amd64@freebsd.org Subject: Re: non-temporal copyin/copyout? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2006 22:04:20 -0000 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