From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Korsgaard Subject: Re: Performance of spi_mpc83xx.c sucks. Date: Tue, 21 Oct 2008 20:14:15 +0200 Message-ID: <877i81rf2g.fsf@macbook.be.48ers.dk> References: <1224605947.14078.17.camel@gentoo-jocke.transmode.se> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general To: Joakim Tjernlund Return-path: In-Reply-To: <1224605947.14078.17.camel-/EMGr9iCeazgSi9v3i4K4Pmbkio/vSLMs0AfqQuZ5sE@public.gmane.org> (Joakim Tjernlund's message of "Tue\, 21 Oct 2008 18\:19\:08 +0200") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org >>>>> "Joakim" == Joakim Tjernlund writes: Joakim> We have noticed that the spi_mpc83xx.c driver is very slow, the gap Joakim> between words are huge. Joakim> So I started to optimise it and it still sucks. Joakim> However, if I poll the SPIE_NF SPIE_NE bits instead it works MUCH Joakim> better, like so: Yes, I've noticed the same. I get around ~5 times higher throughput with a simple polled loop in U-Boot compared to under Linux (66MHz clock). I've written it of as simply being a question of interrupt overhead (at 66MHz / 32bits we're talking over 2 million interrupts per second - E.G. only ~100 instructions between each!) Maybe it indeed makes more sense to use polling for high bitrates. -- Bye, Peter Korsgaard ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/