From owner-freebsd-hackers Thu Dec 13 16:33:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id 8E1D037B417 for ; Thu, 13 Dec 2001 16:33:38 -0800 (PST) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.3) with ESMTP id fBE0dXl04925; Thu, 13 Dec 2001 16:39:33 -0800 (PST) (envelope-from msmith@mass.dis.org) Message-Id: <200112140039.fBE0dXl04925@mass.dis.org> To: "Mark Brown" Cc: hackers@freebsd.org Subject: Re: uiomove performance? In-Reply-To: Message from "Mark Brown" of "Thu, 13 Dec 2001 18:35:44 EST." Date: Thu, 13 Dec 2001 16:39:33 -0800 From: Mike Smith 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 > 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. It's not clear why you didn't use uiomove to begin with, since it's already written. 8) However, you're most likely constrained by memory bandwidth, and in that case converting to uiomove is unlikely to change things much. It's probably a sane thing to do, however, as uiomove is pretty smart and it will remove what is basically duplicated cod. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message