From: David Hawkins <dwh@ovro.caltech.edu>
To: Misbah khan <misbah_khan@engineer.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: floating point support in the driver.
Date: Tue, 05 Aug 2008 09:53:45 -0700 [thread overview]
Message-ID: <48988599.5020008@ovro.caltech.edu> (raw)
In-Reply-To: <18827857.post@talk.nabble.com>
Hi Misbah,
> I am running the algorithm on OMAP processor (arm-core)
> and i did tried the same on iMX processor which
> takes 1.7 times more than OMAP.
Ok, thats a 10,000ft benchmark. The observation being
that it fails your requirement.
How does that time compare to the operations
required, and their expected times?
> It is true that the algorithm is performing the vector
> operation which is blowing the cache.
Determined how? Obviously if your cache is 16K and your
data is 64K, there's no way it'll fit in there at once,
but the algorithm could be crafted such that 1K at a time
was processed, while another data packet was moved onto
the cache ... but this is very processor specific.
> But the question is How to lock the cache ? In driver
> how should we implement the same ?
>
> An example code or a document could be helpful in this regard.
Indeed :)
I have no idea how the OMAP works, so the following are
just random, and possibly incorrect ramblings ...
The MPC8349EA startup code uses a trick where it zeros
out sections of the cache while providing an address.
Once the addresses and zeros are in the cache, its locked.
From that point on, memory accesses to those addresses
result in cache 'hits'. This is the startup stack used
by the U-Boot bootloader.
If something similar was done under Linux, then *I guess*
you could implement mmap() and ioremap() the section of
addresses associated with the locked cache lines.
You could then DMA data to and from the cache area,
and run your algorithm there. That would provide you
'fast SRAM'.
However, you might be able to get the same effect by
setting up your processing algorithm such that it handled
smaller chunks of data.
Feel free to explain your data processing :)
Cheers,
Dave
prev parent reply other threads:[~2008-08-05 17:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-01 10:57 floating point support in the driver Misbah khan
2008-08-01 11:32 ` Laurent Pinchart
2008-08-01 12:00 ` Misbah khan
2008-08-01 15:54 ` M. Warner Losh
2008-08-04 5:23 ` Misbah khan
2008-08-04 5:33 ` M. Warner Losh
2008-08-04 5:47 ` David Hawkins
2008-08-05 9:49 ` Misbah khan
2008-08-05 16:53 ` David Hawkins [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=48988599.5020008@ovro.caltech.edu \
--to=dwh@ovro.caltech.edu \
--cc=linuxppc-embedded@ozlabs.org \
--cc=misbah_khan@engineer.com \
/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).