[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm
Subject:    Re: Issue with memcpy/memset and -O2
From:       "Paul Chitescu" <Paul.Chitescu () IMC-Group ! org>
Date:       2005-01-07 14:06:00
Message-ID: 004101c4f4c2$046e8080$e7b9e6c1 () s40 ! icpe ! ro
[Download RAW message or body]

This may be related to how block transfer is implemented on ARM.

Optimized memcpy/memset use a multiple register transfer instruction which
can move up to 32 bytes in a single operation (8 registers of 4 bytes each).
This is very fast but is uninterruptible and hogs the bus until it finishes.
Many such operations in quick sequence (to accomplish a larger transfer) may
lead to audio DMA data starvation.

To verify please run in the same time another program that makes extensive
use of memcpy. This will help identify the problem as you'll know the data
you're sending to the audio device is good.

--
 Paul Chitescu
 pchitescu@null.ro   http://pchitescu.null.ro/   ICQ:22641673
 Any spammers will be painfully squeezed into /dev/null


----- Original Message -----
From: "Jagadeeswaran R." <jagadeeswaran.r@ittiam.com>
To: <linux-arm@lists.arm.linux.org.uk>
Sent: Thursday, January 06, 2005 15:57
Subject: Issue with memcpy/memset and -O2


Hello all,
I am facing some problem while trying to build an audio playout application
on
[kernel 2.4.20/cross-2.95.3 tool chain] ARM9E Eval board.

If I use "memcpy" or "memset" in the audio playout loop, it is creating some
periodic
noise at the playout. If I replace them using for loops the playout is fine.

Also I have observed that using optimization level -O2 to build the
application
creates the same kind of problem.

Is there any problem in using memcpy/memset or optimization level -O2 ?

thanks and regards,
Jagadees



-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ/Etiquette:       http://www.arm.linux.org.uk/armlinux/mailinglists.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic