From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Samuel Ortiz
<samuel.ortiz-EmnPodGKVbzby3iVrkZq2A@public.gmane.org>
Subject: Re: [PATCH 1/2] spi: Add support for dma_min_bytes configuration.
Date: Thu, 8 Apr 2010 09:08:47 -0600 [thread overview]
Message-ID: <s2vfa686aa41004080808o443dd6b7ge4d23c513a1f80a8@mail.gmail.com> (raw)
In-Reply-To: <E1C7579D1379824DAE67858071C8103828208BC339-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
On Thu, Apr 8, 2010 at 4:33 AM, <roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org> wrote:
>
> Hi,
>
>
>>-----Original Message-----
>>From: glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org [mailto:glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org] On
>>Behalf Of ext Grant Likely
>>Sent: 08 April, 2010 09:27
>>To: Tereshonkov Roman (Nokia-D/Helsinki)
>>Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>>Subject: Re: [PATCH 1/2] spi: Add support for dma_min_bytes
>>configuration.
>>
>>Hi Roman,
>>
>>On Tue, Apr 6, 2010 at 4:39 AM, Roman Tereshonkov
>><roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org> wrote:
>>> This parameters defines the minimum number of bytes when dma is used.
>>>
>>> Signed-off-by: Roman Tereshonkov <roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
>>
>>The intent of this feature is... ? Your patch needs a better
>>description as to why it is needed; especially considering that it
>>changes common code.
>>
>>But, inferring from the code that is written, I can guess what you're
>>trying to do, if not why. Why would spi_devices care what the minimum
>>size of a DMA transfer is? The SPI bus driver is in a far better
>>position to make that determination.
>>
>>Also, since this essentially adds a new 'knob' for spi_devices to
>>twiddle, what is the expected behaviour for SPI bus controllers that
>>don't support it? Is it a required feature for spi bus drivers to
>>implement if they support DMA?
>
> The spi transactions can be handled in two ways: dma and pio.
> For the best perfomance the minimun number of bytes when dma is used
> can be found experimentaly and passed through the platform board config files.
>
> Now I will talk about omap2/3 spi only.
> If the mentioned parameter is not set then the static default one
> is used (as it is nowdays).
> This exludes the patch influence on other spi devices controlled
> by the same omap2/3 spi master.
>
> I think you might be right. The better way would be to pass it
> through the controller_data field of the spi_board_info.
> Then I do not need to touch spi.h and spi.c.
The question that must be asked, will this new optimization option
actually be profiled for most boards? Should it really be a
board-specific parameter? Or even an SoC specific parameter? Or to
be even more specific, do *you* have two different boards that need a
different value for the minimum dma bytes?
If the answer is no, then I recommend profiling your platform and
floating out a patch that changes the default value to what you find
is best. If there is no opposition to the value you choose, then
there is no need to make it a tunable until someone else comes along
who needs it to be something different.
The current value of DMA_MIN_BYTES hasn't changed since the driver was
first submitted. I suspect that it has not been optimized. What does
Samuel have to say about it?
g.
>
> I will create a new patch.
> But now I wonder about patches syncronization.
> The first patch should go to linux-omap tree as it is for arch/arm/plat-omap/include/plat/mcspi.h.
> The second patch applied after the first one is for driver/spi/omap2_mcspi.h.
> Or can you handle both patches?
>
>
> Regards
> Roman
------------------------------------------------------------------------------
Download Intel® 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
next prev parent reply other threads:[~2010-04-08 15:08 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 [this message]
[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
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=s2vfa686aa41004080808o443dd6b7ge4d23c513a1f80a8@mail.gmail.com \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@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).