linux/arch/sparc
Mike Kravetz 654f480762 sparc64: mm: fix copy_tsb to correctly copy huge page TSBs
When a TSB grows beyond its current capacity, a new TSB is allocated
and copy_tsb is called to copy entries from the old TSB to the new.
A hash shift based on page size is used to calculate the index of an
entry in the TSB.  copy_tsb has hard coded PAGE_SHIFT in these
calculations.  However, for huge page TSBs the value REAL_HPAGE_SHIFT
should be used.  As a result, when copy_tsb is called for a huge page
TSB the entries are placed at the incorrect index in the newly
allocated TSB.  When doing hardware table walk, the MMU does not
match these entries and we end up in the TSB miss handling code.
This code will then create and write an entry to the correct index
in the TSB.  We take a performance hit for the table walk miss and
recreation of these entries.

Pass a new parameter to copy_tsb that is the page size shift to be
used when copying the TSB.

Suggested-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-06 13:45:02 -07:00
..
boot
configs sparc64:Support User Probes for sparc 2016-12-11 18:01:51 -08:00
crypto
include sparc: Fix -Wstringop-overflow warning 2017-05-17 12:07:46 -07:00
kernel sparc64: mm: fix copy_tsb to correctly copy huge page TSBs 2017-06-06 13:45:02 -07:00
lib sparc64: Add __multi3 for gcc 7.x and later. 2017-06-05 11:30:33 -07:00
math-emu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mm sparc64: mm: fix copy_tsb to correctly copy huge page TSBs 2017-06-06 13:45:02 -07:00
net sparc64: Fix BPF JIT wrt. branches and ldimm64 instructions. 2017-05-01 20:48:36 -07:00
oprofile
power
prom sparc: fixing ident and beautifying code 2016-10-06 01:46:40 -04:00
Kbuild
Kconfig arch/sparc: support NR_CPUS = 4096 2017-06-06 16:41:47 -04:00
Kconfig.debug
Makefile