From owner-freebsd-hackers Thu Dec 13 15:43:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 39B7737B41B for ; Thu, 13 Dec 2001 15:43:36 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 93B7381E0B; Thu, 13 Dec 2001 17:43:30 -0600 (CST) Date: Thu, 13 Dec 2001 17:43:30 -0600 From: Alfred Perlstein To: Mark Brown Cc: hackers@freebsd.org Subject: Re: uiomove performance? Message-ID: <20011213174330.H79896@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from simm_s_list@hotmail.com on Thu, Dec 13, 2001 at 06:35:44PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Mark Brown [011213 17:35] wrote: > Does anyone know if there is a significant performance gain to maintaining > scatter/gather lists with uio rather than writing the s/g routine yourself. > > To be more specific: > I currently have a routine that takes a memory segments and places them in a > contiguous memory buffer. We need to optimize the routine for better CPU > utilization. We currently get the memory list and organize it using memcopy. > I would like to use uiomove but it is hard to justify the time needed to > convert the current routine to uiomove if there is only a insignificant > performance gain. Keep in mind this routine is being called frequently. > > I would like to justify to my boss that using uiomove would have significant > performance benefits over our current routine that uses memcopy. Uh....... If you have a routine using memcpy then you're effectively making the UIO as you go, making the additional copy is just stupid. It should be trivial to convert the routine and I strongly suggest doing so. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' http://www.morons.org/rants/gpl-harmful.php3 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message