From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/2] omap: switch to ioremap function pointer
Date: Sun, 22 May 2011 18:40:54 +0200 [thread overview]
Message-ID: <201105221840.54528.arnd@arndb.de> (raw)
In-Reply-To: <20110522130955.GE17672@n2100.arm.linux.org.uk>
On Sunday 22 May 2011 15:09:55 Russell King - ARM Linux wrote:
> On Sun, May 22, 2011 at 01:35:03PM +0200, Arnd Bergmann wrote:
> > I mean don't call iotable_init() for regions that is ioremapped
> > into a device driver. Having both iotable_init and ioremap
> > on the same area is a bit fishy anyway,
>
> That's how things used to be done. What your proposal causes is people
> defining virtual address constants in platform header files, and using
> those constants directly in drivers.
My first proposal was to remove the fixed mapping in the cases where a
driver uses ioremap, not the other way round. The other proposal was
to handle the static mappings in the common ioremap code.
> Does it make sense to individually ioremap(), where each ioremap() creates
> 16 page table entries and therefore potentially consumes up to 16 TLB
> entries, resulting in 256 TLB entries to cover all 16 devices, or does it
> make sense to map the entire region as one section at boot time, thereby
> only consuming one TLB entry for the entire lot?
>
> I believe TI have done some testing in this area, and have showed that
> this kind of optimization is reflected in the performance figures.
Ok, good to know. Can anyone point to the specific results? TLB pressure
is the obvious concern, but I didn't expect it to be measurable in this
scenario.
> Given that people are worrying about 0.2% performance gains through
> _elimination_ of the list prefetching due to TLB misses (see the linux-arch
> thread, and the proposed removal of prefetching from the list macros) I
> don't think anyone can justify avoiding the above kind of optimization.
The main reason the TLB miss for the list walk hurts so much is that it's
in the hot path for important workloads and that certain CPUs fail to install
an invalid TLB entry, so the pointless page walk gets exectuted all the time.
For the device mappings, I would assume that the accesses are typically
going to the most active devices, which consequently are still present in
the TLB. My na?ve expectation would be that there is more to gain from
using large pages ioremap (which we don't do AFAICT) whenever we map more
than a page than by pre-mapping some of the devices using large pages.
Arnd
next prev parent reply other threads:[~2011-05-22 16:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-22 9:04 [RFC PATCH 1/2] arm: introduce arch_ioremap and arch_iounmap function pointer Jean-Christophe PLAGNIOL-VILLARD
2011-05-22 9:04 ` [RFC PATCH 2/2] omap: switch to ioremap " Jean-Christophe PLAGNIOL-VILLARD
2011-05-22 9:54 ` Arnd Bergmann
2011-05-22 11:13 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-22 11:20 ` Santosh Shilimkar
2011-05-22 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-22 11:35 ` Arnd Bergmann
2011-05-22 11:46 ` Santosh Shilimkar
2011-05-22 12:56 ` Arnd Bergmann
2011-05-22 13:20 ` Santosh Shilimkar
2011-05-22 13:09 ` Russell King - ARM Linux
2011-05-22 13:23 ` Santosh Shilimkar
2011-05-22 16:40 ` Arnd Bergmann [this message]
2011-05-22 10:03 ` [RFC PATCH 1/2] arm: introduce arch_ioremap and arch_iounmap " Russell King - ARM Linux
2011-05-22 11:05 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-22 13:19 ` Russell King - ARM Linux
2011-05-22 14:58 ` Jean-Christophe PLAGNIOL-VILLARD
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=201105221840.54528.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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.