From mboxrd@z Thu Jan 1 00:00:00 1970 From: llandre Subject: spi_async and heavy CPU occupation by ksoftirqd Date: Wed, 08 Aug 2007 10:21:21 +0200 Message-ID: <46B97D01.5000208@dave-tech.it> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org I'm facing the following problem. I have to poll a SPI device periodically (around ten times a second). Both command and response are 1 byte. To do the job I created a work that looks like this: work(...) { sets debug_pin poll the device err = queue_delayed_work(wq, work, (HZ / 10)); clears debug_pin } The actual SPI transaction is perfomed by invoking spi_async. SPI transactions work fine but the kernel daemon ksoftirqd eats about 18% of CPU time. With the help of debug pin, I measured the execution time of function work that is around 70us. Then I commented out the call of spi_async and the ksoftirqd CPU occupation drops to 0%. Am I doing something wrong? I'm working with kernel 2.6.21.3 on iMXL ARM9 processor. TIA, llandre DAVE Electronics System House - R&D Department web: http://www.dave-tech.it email: r&d2-4VKA1VU3ct/j+vYz1yj4TQ@public.gmane.org ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/