From linux-arm-kernel Wed Oct 06 17:58:56 2004 From: Matthias Welwarsky Date: Wed, 06 Oct 2004 17:58:56 +0000 To: linux-arm-kernel Subject: Re: perfomance of copy_to/from_user Message-Id: <200410062019.30326.mwelwarsky () web ! de> X-MARC-Message: https://marc.info/?l=linux-arm-kernel&m=109708553631364 On Wednesday 06 October 2004 18:54, Thomas Wöckinger wrote: > On Wednesday 06 October 2004 18:28, you wrote: > > On Wed, 6 Oct 2004, Thomas Wöckinger wrote: > > > Hi! > > > > > > I have some performance Problems using copy_to_user or copy_from_user. > > > I can only transfer about 22,5 MB/s from or to userspace > > > > > > I am using an Intel Xscale processor running on 500MHz pluged into > > > idxp425 development board. An DSP card (pluged into PCI slot) is > > > writing directly into a 256K kernel space buffer. > > > > > > the kernel version is 2.6.8.1 > > > > > > My first question is: can i speed up the copy_to/from_user? > > > > Hardly. > > > > > if not, is it possible on an idxp425 board to access the whole memory > > > directly, so that i can write to the userspace buffer without using the > > > xscale. > > > > It is possible for you to mmap() the 256k kernel buffer into user space > > and avoid copying the data entirely. > > sometimes i have to transfer about 1MB (imagedata) beetween the dsp card > and the xscale, and it's hard to get such a big continous buffer, > especially when i have four dsp card's and each of them want to transfer > such an datachunk to the host If this is the primary use for your product, why not set some memory aside beforehand, mmap() it into userspace and manage it from there? That's pretty much how framebuffer drivers allow userspace access to a graphic cards memory. regards, matthias ------------------------------------------------------------------- Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/armlinux/mlfaq.php Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php