<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/arc/include, branch v3.10-rc1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch/arc/include?h=v3.10-rc1</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch/arc/include?h=v3.10-rc1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-05-09T16:30:57Z</updated>
<entry>
<title>ARC: [mm] Aliasing VIPT dcache support 4/4</title>
<updated>2013-05-09T16:30:57Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-05-09T13:50:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5bba49f5397c012d873c73860ad7b50c526e613b'/>
<id>urn:sha1:5bba49f5397c012d873c73860ad7b50c526e613b</id>
<content type='text'>
Enforce congruency of userspace shared mappings

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [mm] Aliasing VIPT dcache support 3/4</title>
<updated>2013-05-09T16:30:57Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-05-09T16:25:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=de2a852cc0d4c4d6a9c22a597c9cc231f2e6ceb4'/>
<id>urn:sha1:de2a852cc0d4c4d6a9c22a597c9cc231f2e6ceb4</id>
<content type='text'>
Fix the one zillion warnings

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [mm] Aliasing VIPT dcache support 2/4</title>
<updated>2013-05-09T16:29:46Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-05-09T16:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4102b53392d6397d80b6e09b516517efacf7ea77'/>
<id>urn:sha1:4102b53392d6397d80b6e09b516517efacf7ea77</id>
<content type='text'>
This is the meat of the series which prevents any dcache alias creation
by always keeping the U and K mapping of a page congruent.
If a mapping already exists, and other tries to access the page, prev
one is flushed to physical page (wback+inv)

Essentially flush_dcache_page()/copy_user_highpage() create K-mapping
of a page, but try to defer flushing, unless U-mapping exist.
When page is actually mapped to userspace, update_mmu_cache() flushes
the K-mapping (in certain cases this can be optimised out)

Additonally flush_cache_mm(), flush_cache_range(), flush_cache_page()
handle the puring of stale userspace mappings on exit/munmap...

flush_anon_page() handles the existing U-mapping for anon page before
kernel reads it via the GUP path.

Note that while not complete, this is enough to boot a simple
dynamically linked Busybox based rootfs

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [mm] Aliasing VIPT dcache support 1/4</title>
<updated>2013-05-09T16:23:16Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-05-09T09:40:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ec18a81b22ab2b40df8424f2b5fc6be20ccad87'/>
<id>urn:sha1:6ec18a81b22ab2b40df8424f2b5fc6be20ccad87</id>
<content type='text'>
This preps the low level dcache flush helpers to take vaddr argument in
addition to the existing paddr to properly flush the VIPT dcache

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [mm] Lazy D-cache flush (non aliasing VIPT)</title>
<updated>2013-05-07T13:38:15Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-04-16T08:40:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eacd0e950dc2100af54f2a94ae29105bf48ab921'/>
<id>urn:sha1:eacd0e950dc2100af54f2a94ae29105bf48ab921</id>
<content type='text'>
flush_dcache_page( ) is MM hook to ensure that a page has consistent
views between kernel and userspace. Thus it is called when

* kernel writes to a page which at some later point could get mapped to
  userspace (so kernel mapping needs to be flushed-n-inv)
* kernel is about to read from a page with possible userspace mappings
  (so userspace mappings needs to be made coherent with kernel ones)

However for Non aliasing VIPT dcache, any userspace mapping will always
be congruent to kernel mapping. Thus d-cache need need not be flushed at
all (or delayed indefinitely).

The only reason it does need to be flushed is when mapping code pages.
Since icache doesn't snoop dcache, those dirty dcache lines need to be
written back to memory and icache line invalidated so that icache lines
fetch will get the right data.

Decent gains on LMBench fork/exec/sh and File I/O micro-benchmarks.

(1) FPGA @ 80 MHZ

Processor, Processes - times in microseconds - smaller is better
------------------------------------------------------------------------------
Host                 OS  Mhz null null      open slct sig  sig  fork exec sh
                             call  I/O stat clos TCP  inst hndl proc proc proc
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
3.9-rc6-a Linux 3.9.0-r   80 4.79 8.72 66.7 116. 239. 8.39 30.4 4798 14.K 34.K
3.9-rc6-b Linux 3.9.0-r   80 4.79 8.62 65.4 111. 239. 8.35 29.0 3995 12.K 30.K
3.9-rc7-c Linux 3.9.0-r   80 4.79 9.00 66.1 106. 239. 8.61 30.4 2858 10.K 24.K
                                                                ^^^^ ^^^^ ^^^

File &amp; VM system latencies in microseconds - smaller is better
-------------------------------------------------------------------------------
Host                 OS   0K File      10K File     Mmap    Prot   Page 100fd
                        Create Delete Create Delete Latency Fault  Fault selct
--------- ------------- ------ ------ ------ ------ ------- ----- ------- -----
3.9-rc6-a Linux 3.9.0-r  317.8  204.2 1122.3  375.1 3522.0 4.288     20.7 126.8
3.9-rc6-b Linux 3.9.0-r  298.7  223.0 1141.6  367.8 3531.0 4.866     20.9 126.4
3.9-rc7-c Linux 3.9.0-r  278.4  179.2  862.1  339.3 3705.0 3.223     20.3 126.6
                         ^^^^^  ^^^^^  ^^^^^  ^^^^

(2) Customer Silicon @ 500 MHz (166 MHz mem)

------------------------------------------------------------------------------
Host                 OS  Mhz null null      open slct sig  sig  fork exec sh
                             call  I/O stat clos TCP  inst hndl proc proc proc
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
abilis-ba Linux 3.9.0-r  497 0.71 1.38 4.58 12.0 35.5 1.40 3.89 2070 5525 13.K
abilis-ca Linux 3.9.0-r  497 0.71 1.40 4.61 11.8 35.6 1.37 3.92 1411 4317 10.K
                                                                ^^^^ ^^^^ ^^^

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [mm] consolidate icache/dcache sync code</title>
<updated>2013-05-07T13:38:13Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-04-12T06:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=94bad1afeeefbd1b27d7f642de12c04339501a99'/>
<id>urn:sha1:94bad1afeeefbd1b27d7f642de12c04339501a99</id>
<content type='text'>
Now that we have same helper used for all icache invalidates (i.e.
vaddr+paddr based exact line invalidate), consolidate the open coded
calls into one place.

Also rename flush_icache_range_vaddr =&gt; __sync_icache_dcache

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [mm] optimise icache flush for user mappings</title>
<updated>2013-05-07T13:38:12Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-04-11T13:06:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=24603fdd19d978fcc0d089d92370ee1aa3a71e84'/>
<id>urn:sha1:24603fdd19d978fcc0d089d92370ee1aa3a71e84</id>
<content type='text'>
ARC icache doesn't snoop dcache thus executable pages need to be made
coherent before mapping into userspace in flush_icache_page().

However ARC700 CDU (hardware cache flush module) requires both vaddr
(index in cache) as well as paddr (tag match) to correctly identify a
line in the VIPT cache. A typical ARC700 SoC has aliasing icache, thus
the paddr only based flush_icache_page() API couldn't be implemented
efficiently. It had to loop thru all possible alias indexes and perform
the invalidate operation (ofcourse the cache op would only succeed at
the index(es) where tag matches - typically only 1, but the cost of
visiting all the cache-bins needs to paid nevertheless).

Turns out however that the vaddr (along with paddr) is available in
update_mmu_cache() hence better suits ARC icache flush semantics.
With both vaddr+paddr, exactly one flush operation per line is done.

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [mm] optimize needless full mm TLB flush on munmap</title>
<updated>2013-05-07T08:14:00Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-04-05T13:08:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8d56bec2f2945b7e500b413d1bdc24e7dca12877'/>
<id>urn:sha1:8d56bec2f2945b7e500b413d1bdc24e7dca12877</id>
<content type='text'>
munmap ends up calling tlb_flush() which for ARC was flushing the entire
TLB unconditionally (by moving the MMU to a new ASID)

do_munmap
  unmap_region
    unmap_vmas
      unmap_single_vma
         unmap_page_range
            tlb_start_vma
            zap_pud_range
            tlb_end_vma()
  tlb_finish_mmu
    tlb_flush()  ---&gt; unconditional flush_tlb_mm()

So even a single page munmap, a frequent operation when uClibc dynamic
linker (ldso) is loading the dependent shared libraries, would move the
the ASID multiple times - needlessly invalidating the pre-faulted TLB
entries (and increasing the rate of ASID wraparound + full TLB flush).

This is now optimised to only be called if tlb-&gt;full_mm (which means
for exit/execve) cases only. And for those cases, flush_tlb_mm() is
already optimised to be a no-op for mm-&gt;mm_users == 0.

So essentially there are no mmore full mm flushes - except for fork which
anyhow needs it for properly COW'ing parent address space.

munmap now needs to do TLB range flush, which is implemented with
tlb_end_vma()

Results
-------
1. ASID now consistenly moves by 4 during a simple ls (as opposed to 5 or
   7 before).

2. LMBench microbenchmark also shows improvements

Basic system parameters
------------------------------------------------------------------------------
Host                 OS Description              Mhz  tlb  cache  mem scal
                                                     pages line   par load
                                                           bytes
--------- ------------- ----------------------- ---- ----- ----- ------ ----
3.9-rc5-0 Linux 3.9.0-r 3.9-rc5-0404-gcc-4.4-ba   80     8    64 1.1000 1
3.9-rc5-0 Linux 3.9.0-r 3.9-rc5-0405-avoid-full   80     8    64 1.1200 1

Processor, Processes - times in microseconds - smaller is better
------------------------------------------------------------------------------
Host                 OS  Mhz null null      open slct sig  sig  fork exec sh
                             call  I/O stat clos TCP  inst hndl proc proc proc
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
3.9-rc5-0 Linux 3.9.0-r   80 4.81 8.69 68.6 118. 239. 8.53 31.6 4839 13.K 34.K
3.9-rc5-0 Linux 3.9.0-r   80 4.46 8.36 53.8 91.3 223. 8.12 24.2 4725 13.K 33.K

File &amp; VM system latencies in microseconds - smaller is better
-------------------------------------------------------------------------------
Host                 OS   0K File      10K File     Mmap    Prot   Page 100fd
                        Create Delete Create Delete Latency Fault  Fault selct
--------- ------------- ------ ------ ------ ------ ------- ----- ------- -----
3.9-rc5-0 Linux 3.9.0-r  314.7  223.2 1054.9  390.2  3615.0 1.590 20.1 126.6
3.9-rc5-0 Linux 3.9.0-r  265.8  183.8 1014.2  314.1  3193.0 6.910 18.8 110.4

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [TB10x] Add support for TB10x platform</title>
<updated>2013-05-07T08:13:59Z</updated>
<author>
<name>Christian Ruppert</name>
<email>christian.ruppert@abilis.com</email>
</author>
<published>2013-04-12T06:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=072eb693904a52df95ac3d8e8ee00752ed82342c'/>
<id>urn:sha1:072eb693904a52df95ac3d8e8ee00752ed82342c</id>
<content type='text'>
Infrastructure required to make the Linux kernel compile and boot on the
Abilis Systems TB10x series of SOCs based on ARC700 CPUs:
  - Kmake related files (Kconfig, Makefile, tb10x_defconfig)
  - TB10x platform initialisation

Signed-off-by: Christian Ruppert &lt;christian.ruppert@abilis.com&gt;
Signed-off-by: Pierrick Hascoet &lt;pierrick.hascoet@abilis.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: Prepare interrupt code for external controllers</title>
<updated>2013-05-07T08:13:58Z</updated>
<author>
<name>Christian Ruppert</name>
<email>christian.ruppert@abilis.com</email>
</author>
<published>2013-04-11T13:19:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a37cdacc9bc339097a2c206aad449ca307d7fd63'/>
<id>urn:sha1:a37cdacc9bc339097a2c206aad449ca307d7fd63</id>
<content type='text'>
This patch adds some room for CPU-external interrupt controllers in the
Linux interrupt space. Until now, only the 32 CPU internal interrupt lines
were supported which does not allow for external interrupt controllers such
as GPIO modules etc.

Signed-off-by: Christian Ruppert &lt;christian.ruppert@abilis.com&gt;
Signed-off-by: Pierrick Hascoet &lt;pierrick.hascoet@abilis.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
</feed>
