<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/sparc/mm, branch linux-3.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-02-27T17:21:12Z</updated>
<entry>
<title>sparc64: Fix tsb_grow() in atomic context.</title>
<updated>2013-02-27T17:21:12Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2013-02-20T06:34:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d13cdf91b4ccc961b496a72d80b549dc158f970e'/>
<id>urn:sha1:d13cdf91b4ccc961b496a72d80b549dc158f970e</id>
<content type='text'>
[ Upstream commit 0fbebed682ff2788dee58e8d7f7dda46e33aa10b ]

If our first THP installation for an MM is via the set_pmd_at() done
during khugepaged's collapsing we'll end up in tsb_grow() trying to do
a GFP_KERNEL allocation with several locks held.

Simply using GFP_ATOMIC in this situation is not the best option
because we really can't have this fail, so we'd really like to keep
this an order 0 GFP_KERNEL allocation if possible.

Also, doing the TSB allocation from khugepaged is a really bad idea
because we'll allocate it potentially from the wrong NUMA node in that
context.

So what we do is defer the hugepage TSB allocation until the first TLB
miss we take on a hugepage.  This is slightly tricky because we have
to handle two unusual cases:

1) Taking the first hugepage TLB miss in the window trap handler.
   We'll call the winfix_trampoline when that is detected.

2) An initial TSB allocation via TLB miss races with a hugetlb
   fault on another cpu running the same MM.  We handle this by
   unconditionally loading the TSB we see into the current cpu
   even if it's non-NULL at hugetlb_setup time.

Reported-by: Meelis Roos &lt;mroos@ut.ee&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sparc64: Handle hugepage TSB being NULL.</title>
<updated>2013-02-27T17:21:12Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2013-02-19T21:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f39d6de4af78fb70abbf7f43a2ecbff2a1e8d795'/>
<id>urn:sha1:f39d6de4af78fb70abbf7f43a2ecbff2a1e8d795</id>
<content type='text'>
[ Upstream commit bcd896bae0166b4443503482a26ecf84d9ba60ab ]

Accomodate the possibility that the TSB might be NULL at
the point that update_mmu_cache() is invoked.  This is
necessary because we will sometimes need to defer the TSB
allocation to the first fault that happens in the 'mm'.

Seperate out the hugepage PTE test into a seperate function
so that the logic is clearer.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sparc64: Fix gfp_flags setting in tsb_grow().</title>
<updated>2013-02-27T17:21:12Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2013-02-19T20:56:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab3f3a4fbfaec974f34b636d9bf978f4d3cc0b28'/>
<id>urn:sha1:ab3f3a4fbfaec974f34b636d9bf978f4d3cc0b28</id>
<content type='text'>
[ Upstream commit a55ee1ff751f88252207160087d8197bb7538d4c ]

We should "|= more_flags" rather than "= more_flags".

Reported-by: David Rientjes &lt;rientjes@google.com&gt;
Acked-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sparc64: Fix get_user_pages_fast() wrt. THP.</title>
<updated>2013-02-27T17:21:12Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2013-02-13T20:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f751f60a108d559a55fab8a916144da0fb1bb88'/>
<id>urn:sha1:1f751f60a108d559a55fab8a916144da0fb1bb88</id>
<content type='text'>
[ Upstream commit 89a77915e0f56dc7b9f9082ba787895b6a83f809 ]

Mostly mirrors the s390 logic, as unlike x86 we don't need the
SetPageReferenced() bits.

On sparc64 we also lack a user/privileged bit in the huge PMDs.

In order to make this work for THP and non-THP builds, some header
file adjustments were necessary.  Namely, provide the PMD_HUGE_* bit
defines and the pmd_large() inline unconditionally rather than
protected by TRANSPARENT_HUGEPAGE.

Reported-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sparc64: Add global PMU register dumping via sysrq.</title>
<updated>2012-10-16T16:34:01Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2012-10-16T16:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=916ca14aaf12a7191118adb51bb95e3c7866380d'/>
<id>urn:sha1:916ca14aaf12a7191118adb51bb95e3c7866380d</id>
<content type='text'>
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sparc64: Fix deficiencies in sun4v error reporting.</title>
<updated>2012-10-11T00:19:32Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2012-10-11T00:19:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f88620b9c5521e9cb9de88e56272bfec3d831513'/>
<id>urn:sha1:f88620b9c5521e9cb9de88e56272bfec3d831513</id>
<content type='text'>
Missing error types, attributes, and report fields.  Pad out
to 64-bytes.

Make string reporting cleaner and easier to extend in the future using
"const char *" arrays that index by either bit position, or absolute
field value.

Report the raw 64-byte error report as a sequence of u64s before the
annotated version.

Only report fields which are valid, given the context and the
attribute bits which are set.

For shutdown requests, use the local copy of the error report not the
one we just freed up back to the queue.  Also, use orderly_poweroff()
just like the Domain Services shutdown request code does.

If the real-address reported is "-1" (unknown) try to disassemble the
instruction to report the effective address of the access.  Only do
this in privileged mode.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sparc64: Support transparent huge pages.</title>
<updated>2012-10-09T07:23:06Z</updated>
<author>
<name>David Miller</name>
</author>
<published>2012-10-08T23:34:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e695d2ecc8451cc2c1603d60b5c8e7f5581923a'/>
<id>urn:sha1:9e695d2ecc8451cc2c1603d60b5c8e7f5581923a</id>
<content type='text'>
This is relatively easy since PMD's now cover exactly 4MB of memory.

Our PMD entries are 32-bits each, so we use a special encoding.  The
lowest bit, PMD_ISHUGE, determines the interpretation.  This is possible
because sparc64's page tables are purely software entities so we can use
whatever encoding scheme we want.  We just have to make the TLB miss
assembler page table walkers aware of the layout.

set_pmd_at() works much like set_pte_at() but it has to operate in two
page from a table of non-huge PTEs, so we have to queue up TLB flushes
based upon what mappings are valid in the PTE table.  In the second regime
we are going from huge-page to non-huge-page, and in that case we need
only queue up a single TLB flush to push out the huge page mapping.

We still have 5 bits remaining in the huge PMD encoding so we can very
likely support any new pieces of THP state tracking that might get added
in the future.

With lots of help from Johannes Weiner.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Gerald Schaefer &lt;gerald.schaefer@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>sparc64: Eliminate PTE table memory wastage.</title>
<updated>2012-10-09T07:23:05Z</updated>
<author>
<name>David Miller</name>
</author>
<published>2012-10-08T23:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c460bec78d9257a54bcc5f9d5fadf89f8c70dbd1'/>
<id>urn:sha1:c460bec78d9257a54bcc5f9d5fadf89f8c70dbd1</id>
<content type='text'>
We've split up the PTE tables so that they take up half a page instead of
a full page.  This is in order to facilitate transparent huge page
support, which works much better if our PMDs cover 4MB instead of 8MB.

What we do is have a one-behind cache for PTE table allocations in the
mm struct.

This logic triggers only on allocations.  For example, we don't try to
keep track of free'd up page table blocks in the style that the s390 port
does.

There were only two slightly annoying aspects to this change:

1) Changing pgtable_t to be a "pte_t *".  There's all of this special
   logic in the TLB free paths that needed adjustments, as did the
   PMD populate interfaces.

2) init_new_context() needs to zap the pointer, since the mm struct
   just gets copied from the parent on fork.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Gerald Schaefer &lt;gerald.schaefer@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>sparc64: Only support 4MB huge pages and 8KB base pages.</title>
<updated>2012-10-09T07:23:04Z</updated>
<author>
<name>David Miller</name>
</author>
<published>2012-10-08T23:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=15b9350a177b9fb23b69e00f78f52890ee338880'/>
<id>urn:sha1:15b9350a177b9fb23b69e00f78f52890ee338880</id>
<content type='text'>
Narrowing the scope of the page size configurations will make the
transparent hugepage changes much simpler.

In the end what we really want to do is have the kernel support multiple
huge page sizes and use whatever is appropriate as the context dictactes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Gerald Schaefer &lt;gerald.schaefer@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>readahead: fault retry breaks mmap file read random detection</title>
<updated>2012-10-09T07:22:47Z</updated>
<author>
<name>Shaohua Li</name>
</author>
<published>2012-10-08T23:32:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45cac65b0fcd287ebb877b141d40ba9bbe8e5da7'/>
<id>urn:sha1:45cac65b0fcd287ebb877b141d40ba9bbe8e5da7</id>
<content type='text'>
.fault now can retry.  The retry can break state machine of .fault.  In
filemap_fault, if page is miss, ra-&gt;mmap_miss is increased.  In the second
try, since the page is in page cache now, ra-&gt;mmap_miss is decreased.  And
these are done in one fault, so we can't detect random mmap file access.

Add a new flag to indicate .fault is tried once.  In the second try, skip
ra-&gt;mmap_miss decreasing.  The filemap_fault state machine is ok with it.

I only tested x86, didn't test other archs, but looks the change for other
archs is obvious, but who knows :)

Signed-off-by: Shaohua Li &lt;shaohua.li@fusionio.com&gt;
Cc: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
