<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/mm/slice.c, branch linux-4.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-04-11T02:00:23Z</updated>
<entry>
<title>powerpc/8xx: Fix build with hugetlbfs enabled</title>
<updated>2018-04-11T02:00:23Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2018-04-10T08:51:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=032900e62c176d75923baf95ad880e5d6ba71171'/>
<id>urn:sha1:032900e62c176d75923baf95ad880e5d6ba71171</id>
<content type='text'>
8xx uses the slice code when hugetlbfs is enabled. We missed a header
include on 8xx which resulted in the below build failure:

  config: mpc885_ads_defconfig + CONFIG_HUGETLBFS

  arch/powerpc/mm/slice.c: In function 'slice_get_unmapped_area':
  arch/powerpc/mm/slice.c:655:2: error: implicit declaration of function 'need_extra_context'
  arch/powerpc/mm/slice.c:656:3: error: implicit declaration of function 'alloc_extended_context'

on PPC64 the mmu_context.h was included via linux/pkeys.h

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/mm: Add support for handling &gt; 512TB address in SLB miss</title>
<updated>2018-03-30T13:10:38Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2018-03-26T10:04:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f384796c40dc55b3dba25e0ee9c1afd98c6d24d1'/>
<id>urn:sha1:f384796c40dc55b3dba25e0ee9c1afd98c6d24d1</id>
<content type='text'>
For addresses above 512TB we allocate additional mmu contexts. To make
it all easy, addresses above 512TB are handled with IR/DR=1 and with
stack frame setup.

The mmu_context_t is also updated to track the new extended_ids. To
support upto 4PB we need a total 8 contexts.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
[mpe: Minor formatting tweaks and comment wording, switch BUG to WARN
      in get_ea_context().]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/mm/slice: Consolidate return path in slice_get_unmapped_area()</title>
<updated>2018-03-30T13:10:37Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2018-03-26T10:04:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0dea04b288c06654b0de3563c5b8cdfe6130e450'/>
<id>urn:sha1:0dea04b288c06654b0de3563c5b8cdfe6130e450</id>
<content type='text'>
In a following patch, on finding a free area we will need to do
allocatinon of extra contexts as needed. Consolidating the return path
for slice_get_unmapped_area() will make that easier.

Split into a separate patch to make review easy.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/mm/slice: remove radix calls to the slice code</title>
<updated>2018-03-13T12:43:08Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2018-03-07T01:37:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=014a32b30e9d81b47ef82b9995b52c3a0c8b4082'/>
<id>urn:sha1:014a32b30e9d81b47ef82b9995b52c3a0c8b4082</id>
<content type='text'>
This is a tidy up which removes radix MMU calls into the slice
code.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/mm/slice: Use const pointers to cached slice masks where possible</title>
<updated>2018-03-13T12:43:08Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2018-03-07T01:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d262bd5a73998252d1cdf632bedaf1ca540839d8'/>
<id>urn:sha1:d262bd5a73998252d1cdf632bedaf1ca540839d8</id>
<content type='text'>
The slice_mask cache was a basic conversion which copied the slice
mask into caller's structures, because that's how the original code
worked. In most cases the pointer can be used directly instead, saving
a copy and an on-stack structure.

On POWER8, this increases vfork+exec+exit performance by 0.3%
and reduces time to mmap+munmap a 64kB page by 2%.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/mm/slice: remove dead code</title>
<updated>2018-03-13T12:43:07Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2018-03-07T01:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74907558301f6540422ed1f4012af241b2c91733'/>
<id>urn:sha1:74907558301f6540422ed1f4012af241b2c91733</id>
<content type='text'>
This code is never compiled in, and it gets broken by the next
patch, so remove it.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/mm/slice: Switch to 3-operand slice bitops helpers</title>
<updated>2018-03-13T12:43:07Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2018-03-07T01:37:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8c93549142077da10a02329378a8cfa46ce511c'/>
<id>urn:sha1:b8c93549142077da10a02329378a8cfa46ce511c</id>
<content type='text'>
This converts the slice_mask bit operation helpers to be the usual
3-operand kind, which allows 2 inputs to set a different output
without an extra copy, which is used in the next patch.

Adds slice_copy_mask, which will be used in the next patch.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/mm/slice: implement slice_check_range_fits</title>
<updated>2018-03-13T12:43:06Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2018-03-07T01:37:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae3066bd1cbe58e596c791f72a36e576df5d9ed1'/>
<id>urn:sha1:ae3066bd1cbe58e596c791f72a36e576df5d9ed1</id>
<content type='text'>
Rather than build slice masks from a range then use that to check for
fit in a candidate mask, implement slice_check_range_fits that checks
if a range fits in a mask directly.

This allows several structures to be removed from stacks, and also we
don't expect a huge range in a lot of these cases, so building and
comparing a full mask is going to be more expensive than testing just
one or two bits of the range.

On POWER8, this increases vfork+exec+exit performance by 0.3%
and reduces time to mmap+munmap a 64kB page by 5%.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/mm/slice: implement a slice mask cache</title>
<updated>2018-03-13T12:43:06Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2018-03-07T01:37:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5709f7cfd8305252dc327206bd674ad65ca4d77f'/>
<id>urn:sha1:5709f7cfd8305252dc327206bd674ad65ca4d77f</id>
<content type='text'>
Calculating the slice mask can become a signifcant overhead for
get_unmapped_area. This patch adds a struct slice_mask for
each page size in the mm_context, and keeps these in synch with
the slices psize arrays and slb_addr_limit.

On Book3S/64 this adds 288 bytes to the mm_context_t for the
slice mask caches.

On POWER8, this increases vfork+exec+exit performance by 9.9%
and reduces time to mmap+munmap a 64kB page by 28%.

Reduces time to mmap+munmap by about 10% on 8xx.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/mm/slice: pass pointers to struct slice_mask where possible</title>
<updated>2018-03-13T12:43:05Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2018-03-07T01:37:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=830fd2d45aa11631325404904d02c7b530d40119'/>
<id>urn:sha1:830fd2d45aa11631325404904d02c7b530d40119</id>
<content type='text'>
Pass around const pointers to struct slice_mask where possible, rather
than copies of slice_mask, to reduce stack and call overhead.

checkstack.pl gives, before:
0x00000d1c slice_get_unmapped_area [slice.o]:		592
0x00001864 is_hugepage_only_range [slice.o]:		448
0x00000754 slice_find_area_topdown [slice.o]:		400
0x00000484 slice_find_area_bottomup.isra.1 [slice.o]:	272
0x000017b4 slice_set_range_psize [slice.o]:		224
0x00000a4c slice_find_area [slice.o]:			128
0x00000160 slice_check_fit [slice.o]:			112

after:
0x00000ad0 slice_get_unmapped_area [slice.o]:		448
0x00001464 is_hugepage_only_range [slice.o]:		288
0x000006c0 slice_find_area [slice.o]:			144
0x0000016c slice_check_fit [slice.o]:			128
0x00000528 slice_find_area_bottomup.isra.2 [slice.o]:	128
0x000013e4 slice_set_range_psize [slice.o]:		128

This increases vfork+exec+exit performance by 1.5%.

Reduces time to mmap+munmap a 64kB page by 17%.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
