Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Dec 2001 22:06:42 -0500
From:      "Mark Brown" <simm_s_list@hotmail.com>
To:        "Mike Smith" <msmith@freebsd.org>
Cc:        <hackers@freebsd.org>
Subject:   Re: uiomove (CPU) performance?
Message-ID:  <OE435dRuYnZlmDVRXGs00001ade@hotmail.com>
References:  <200112140039.fBE0dXl04925@mass.dis.org>

next in thread | previous in thread | raw e-mail | index | archive | help
The code is kernel mode so I do not think the memcopy routine uses uiomove
in this case(I could be wrong). Also this code is multiplatform so
that the general code uses memcopy and developers optimize the code to work
on the different platforms they are in. Speed is not my
concern right now because we can max out the speed of the device we are
copying from. Our problem lies in the CPU utilization. Will
uiomove be better than memcopy in that respect or the same?

Thanks in advance,
-- Mark
----- Original Message -----
From: "Mike Smith" <msmith@freebsd.org>
To: "Mark Brown" <simm_s_list@hotmail.com>
Cc: <hackers@freebsd.org>
Sent: Thursday, December 13, 2001 7:39 PM
Subject: Re: uiomove performance?


> > 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?OE435dRuYnZlmDVRXGs00001ade>