linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org
Cc: juuso.oikarinen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	samuel.ortiz-EmnPodGKVbzby3iVrkZq2A@public.gmane.org
Subject: Re: [PATCH 1/2] spi: Add support for dma_min_bytes configuration.
Date: Fri, 9 Apr 2010 08:52:56 -0600	[thread overview]
Message-ID: <i2yfa686aa41004090752u24b60033zcc9baf9ea1a3aeac@mail.gmail.com> (raw)
In-Reply-To: <E1C7579D1379824DAE67858071C8103828208BC96F-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>

On Fri, Apr 9, 2010 at 2:38 AM,  <roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org> wrote:
>
>
>>-----Original Message-----
>>From: Oikarinen Juuso (Nokia-D/Tampere)
>>Sent: 09 April, 2010 10:52
>>To: Tereshonkov Roman (Nokia-D/Helsinki)
>>Cc: ext Grant Likely; spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org;
>>Samuel Ortiz
>>Subject: RE: [PATCH 1/2] spi: Add support for dma_min_bytes
>>configuration.
>>
>>On Fri, 2010-04-09 at 09:49 +0200, Tereshonkov Roman (Nokia-D/Helsinki)
>>wrote:
>>>
>>> >-----Original Message-----
>>> >From: Oikarinen Juuso (Nokia-D/Tampere)
>>> >Sent: 09 April, 2010 07:06
>>> >To: Tereshonkov Roman (Nokia-D/Helsinki)
>>> >Cc: ext Grant Likely; spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org;
>>> >Samuel Ortiz
>>> >Subject: RE: [PATCH 1/2] spi: Add support for dma_min_bytes
>>> >configuration.
>>> >
>>> >Hi,
>>> >
>>> >The wl1271 driver does not actually require this value to
>>be adjustable
>>> >- i.e. the driver does not need to know the value. In fact,
>>the wl1271
>>> >does not know about DMA at all, instead the SPI controller
>>driver makes
>>> >the choice on how to perform the transfer most optimally.
>>> >
>>> >So we - or the wl1271 driver - just need the selection
>>between DMA and
>>> >PIO to be optimal in point of view of throughput and CPU
>>load. The old
>>> >threshold value of 8 is far from optimal - something like
>>160-200 is in
>>> >the correct range.
>>> >
>>> >AFAIK performing the SPI transfer optimally should not
>>affect other SPI
>>> >clients in a negative way, and AFAIK there are no other SPI
>>clients in
>>> >Dali than the wl1271, so I guess this new threshold value
>>could also be
>>> >hard-coded into the omap2_mcspi driver.
>>>
>>>
>>>
>>> What about omap2 based projects which use the same driver?
>>>
>>
>>The threshold, I think, is ultimately something that depends
>>on how long
>>it takes to arm DMA. The longer it takes to do that, the larger the
>>optimal threshold.
>>
>>Is it conceivable, that the time it takes to arm the DMA in those
>>potential platforms varies? If it does, the threshold should be
>>configurable.
>
> There are wl1251 and wl1271 spi clients in omap3. And there are two
> omap2 spi clients, touchscreen ads7846 and wlan p54spi, found in
> arch/arm/mach-omap2. All of them use now the default DMA_MIN_BYTES
> set to 8. When we change this value for our needs it might influence
> also on all of them.

Yup.  Change the default, post the patch, and solicit omap2 users for feedback.

> Having the same spi clock but different cpu clock for omap2 and omap3
> I suspect that optimal DMA_MIN_VALUE found for omap3
> will be different for omap2.

Most likely, but I would hold off merging a new tunable parameter
until someone actually takes on the work of tuning for omap2 vs.
omap3.  No sense adding a dynamic tunable if it never gets used.

g.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

      parent reply	other threads:[~2010-04-09 14:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-06 10:39 [PATCH 1/2] spi: Add support for dma_min_bytes configuration Roman Tereshonkov
     [not found] ` <1270550389-30392-1-git-send-email-roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-06 10:39   ` [PATCH 2/2] omap2_mcspi: Use dma_min_bytes parameter when it is configured Roman Tereshonkov
2010-04-08  6:26   ` [PATCH 1/2] spi: Add support for dma_min_bytes configuration Grant Likely
     [not found]     ` <z2rfa686aa41004072326z5ff8c044l46330b85dfd7ae74-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-08 10:33       ` roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w
     [not found]         ` <E1C7579D1379824DAE67858071C8103828208BC339-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
2010-04-08 15:08           ` Grant Likely
     [not found]             ` <s2vfa686aa41004080808o443dd6b7ge4d23c513a1f80a8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-08 15:25               ` roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w
     [not found]                 ` <E1C7579D1379824DAE67858071C8103828208BC539-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
2010-04-08 16:27                   ` Grant Likely
2010-04-09  4:05                   ` Juuso Oikarinen
     [not found]                     ` <1270785939.10120.1141.camel-gZysiALljqf+W+uuys5jPoH6Mc4MB0Vx@public.gmane.org>
2010-04-09  4:56                       ` Grant Likely
2010-04-09  7:49                       ` roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w
     [not found]                         ` <E1C7579D1379824DAE67858071C8103828208BC90A-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
2010-04-09  7:52                           ` Juuso Oikarinen
     [not found]                             ` <1270799541.10120.1146.camel-gZysiALljqf+W+uuys5jPoH6Mc4MB0Vx@public.gmane.org>
2010-04-09  8:38                               ` roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w
     [not found]                                 ` <E1C7579D1379824DAE67858071C8103828208BC96F-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
2010-04-09 14:52                                   ` Grant Likely [this message]

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=i2yfa686aa41004090752u24b60033zcc9baf9ea1a3aeac@mail.gmail.com \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=juuso.oikarinen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=samuel.ortiz-EmnPodGKVbzby3iVrkZq2A@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).