From: Ned Forrester <nforrester-/d+BM93fTQY@public.gmane.org>
To: Zik Saleeba <zik-fsgeVU6Z5FysTnJN9+BGXg@public.gmane.org>
Cc: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
stephen-nl6u4wocdmy51APUEpUfAkEOCMrvLtNR@public.gmane.org
Subject: Re: PXA270 SSPSFRM gates chip select ?
Date: Mon, 11 Feb 2008 23:43:50 -0500 [thread overview]
Message-ID: <47B12406.9040208@whoi.edu> (raw)
In-Reply-To: <33e9dd1c0802111948u2256d0adj8caa478073795d78-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Zik Saleeba wrote:
> On Feb 12, 2008 2:24 PM, Ned Forrester <nforrester-/d+BM93fTQY@public.gmane.org> wrote:
>> I thought it was generally considered good practice...
>
> Yes, it probably is good practice. Unfortunately the tasklet seemed to
> be causing performance issues which made the driver essentially
> unusable for my application. I'm working with a serial chip which
> requires large numbers of small SPI transfers (several register reads
> etc. via SPI on each interrupt). If each of these transfers takes a
> millisecond it becomes impossible to service even a single fairly slow
> serial connection. I have to service 8 relatively fast serial ports so
> I can't put up with 99% SPI unavailability.
I thought you might be doing lots of little transfers; that would
explain your need. Is each transfer in a separate message, because you
have to interact with every transfer, or can you put several transfers
in one message, to be executed without higher level interaction? The
latter would be faster because each transfer would be pumped in
interrupt context, rather than from a work queue.
> I'm using an earlier kernel (2.6.16) which I've back-ported the latest
> SPI code so it's possible that tasklets work better in more recent
> kernels. Anyone know if that might be true?
Well I do know that the version of pxa2xx_spi.c in 2.6.16 is very old.
How much did you backport? Did you get Stephen's 12/7/06 patches?
Reading your test above, I would guess you did, but wonder what you had
to change to get the "latest" to compile in 2.6.16. Does your
pxa2xx_spi.c contain the function "set_dma_burst_and_threshold()"? If it
does, you have Stephen's 12/7/06 patch.
>> I assume that "removing the tasklet" means calling pump_transfers()
>> directly from the interrupt service routines, rather than having the
>> ISRs schedule a tasklet to make that call. Right?
>
> Not exactly. pump_transfers() is called from pump_messages() and a few
> other places, all of which run in a workqueue. So it's not called from
> interrupt context but from a workqueue.
Actually, it is scheduled from each of the xx_error_stop() and
xx_transfer_complete() routines, which all run in interrupt context. It
is also scheduled from pump_messages, which is the only place it is
scheduled from a work_queue. So it is scheduled from a work_queue only
for each new message, but from interrupt context for each transfer
within a message, and at the end of each each message to call giveback().
>> I believe tasklets will never run later than the next timer
>> tick, which I believe is 1ms on most modern processors (but which can be
>> changed). Thus 1ms should be the maximum latency; I would expect better
>> than 1ms most of the time.
>
> I seem to be seeing 1ms consistently on a Compulab cm-x270 - or at
> least I did until I made this change.
You might want to check the kernel config parameters for your system and
make sure that the timer ticks are at least 1000HZ. I notice that mine
is set by default (by Gumstix perhaps) to be a tickless system (dynamic
ticks):
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
I don't know if this helps; it is just the way mine is set.
--
Ned Forrester nforrester-/d+BM93fTQY@public.gmane.org
Oceanographic Systems Lab 508-289-2226
Applied Ocean Physics and Engineering Dept.
Woods Hole Oceanographic Institution Woods Hole, MA 02543, USA
http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212
http://www.whoi.edu/hpb/Site.do?id=1532
http://www.whoi.edu/page.do?pid=10079
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-02-12 4:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 22:43 PXA270 SSPSFRM gates chip select ? J. Scott Merritt
[not found] ` <20080211174339.73ca7ed5.merrij3-IL7dBOYR4Vg@public.gmane.org>
2008-02-11 22:54 ` Zik Saleeba
[not found] ` <33e9dd1c0802111454k5deeaa38o9d21cee610b79da7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-12 2:51 ` David Brownell
[not found] ` <200802111851.10155.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-02-12 3:15 ` Zik Saleeba
[not found] ` <33e9dd1c0802111915q48cb80ecxb33461a9263f9295-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-12 4:02 ` David Brownell
2008-02-12 3:24 ` Ned Forrester
[not found] ` <47B11178.6090904-/d+BM93fTQY@public.gmane.org>
2008-02-12 3:48 ` Zik Saleeba
[not found] ` <33e9dd1c0802111948u2256d0adj8caa478073795d78-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-12 4:16 ` David Brownell
2008-02-12 4:19 ` Zik Saleeba
2008-02-12 4:43 ` Ned Forrester [this message]
[not found] ` <47B12406.9040208-/d+BM93fTQY@public.gmane.org>
2008-02-12 5:24 ` Zik Saleeba
[not found] ` <33e9dd1c0802112124y5ae8dd39ua9078f2b3878a018-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-12 20:48 ` Zik Saleeba
2008-02-12 4:20 ` David Brownell
2008-02-11 23:26 ` Ned Forrester
[not found] ` <47B0D9A4.6080104-/d+BM93fTQY@public.gmane.org>
2008-02-12 4:08 ` Ned Forrester
2008-11-07 16:43 ` PXA270 SSP DMA Corruption J. Scott Merritt
[not found] ` <20081107114312.2f34b389.merrij3-IL7dBOYR4Vg@public.gmane.org>
2008-11-07 18:59 ` Ned Forrester
2008-11-07 19:00 ` PXA270 SSP DMA Corruption - correction J. Scott Merritt
[not found] ` <20081107184819.54baa679.merrij3@rpi.edu>
[not found] ` <491B6249.7070407@whoi.edu>
[not found] ` <491B6249.7070407-/d+BM93fTQY@public.gmane.org>
2008-11-13 1:24 ` PXA270 SSP DMA Corruption J. Scott Merritt
[not found] ` <20081112202438.61c28cf4.merrij3-IL7dBOYR4Vg@public.gmane.org>
2008-11-13 1:48 ` Ned Forrester
[not found] ` <491B8783.9050800-/d+BM93fTQY@public.gmane.org>
2008-11-13 1:59 ` Ned Forrester
[not found] ` <20081112213403.402948b9.merrij3@rpi.edu>
[not found] ` <20081112213403.402948b9.merrij3-IL7dBOYR4Vg@public.gmane.org>
2008-11-13 3:19 ` Ned Forrester
[not found] ` <20081113120134.70d533c8.merrij3@rpi.edu>
[not found] ` <20081113120134.70d533c8.merrij3-IL7dBOYR4Vg@public.gmane.org>
2008-11-13 18:54 ` Ned Forrester
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47B12406.9040208@whoi.edu \
--to=nforrester-/d+bm93ftqy@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=stephen-nl6u4wocdmy51APUEpUfAkEOCMrvLtNR@public.gmane.org \
--cc=zik-fsgeVU6Z5FysTnJN9+BGXg@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.