linux/arch
Mike Kravetz af1b1a9b36 sparc64 mm: Fix base TSB sizing when hugetlb pages are used
do_sparc64_fault() calculates both the base and huge page RSS sizes and
uses this information in calls to tsb_grow().  The calculation for base
page TSB size is not correct if the task uses hugetlb pages.  hugetlb
pages are not accounted for in RSS, therefore the call to get_mm_rss(mm)
does not include hugetlb pages.  However, the number of pages based on
huge_pte_count (which does include hugetlb pages) is subtracted from
this value.  This will result in an artificially small and often negative
RSS calculation.  The base TSB size is then often set to max_tsb_size
as the passed RSS is unsigned, so a negative value looks really big.

THP pages are also accounted for in huge_pte_count, and THP pages are
accounted for in RSS so the calculation in do_sparc64_fault() is correct
if a task only uses THP pages.

A single huge_pte_count is not sufficient for TSB sizing if both hugetlb
and THP pages can be used.  Instead of a single counter, use two:  one
for hugetlb and one for THP.

Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-07-28 21:22:12 -07:00
..
alpha mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
arc Disable "maybe-uninitialized" warning globally 2016-07-27 13:17:41 -07:00
arm New LED class driver: 2016-07-27 14:03:52 -07:00
arm64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-07-27 12:03:20 -07:00
avr32 mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
blackfin media updates for v4.8-rc1 2016-07-26 18:59:59 -07:00
c6x asm-generic patch for 4.7 2016-05-24 15:24:37 -07:00
cris mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
frv mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
h8300 locking/atomic: Remove linux/atomic.h:atomic_fetch_or() 2016-06-16 10:48:32 +02:00
hexagon Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
ia64 Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
m32r mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
m68k mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
metag mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
microblaze Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
mips spi: Updates for v4.8 2016-07-27 14:11:43 -07:00
mn10300 mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
nios2 mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
openrisc Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
parisc New LED class driver: 2016-07-27 14:03:52 -07:00
powerpc New LED class driver: 2016-07-27 14:03:52 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-07-27 12:03:20 -07:00
score mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
sh Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
sparc sparc64 mm: Fix base TSB sizing when hugetlb pages are used 2016-07-28 21:22:12 -07:00
tile Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2016-07-27 10:54:11 -07:00
um Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
unicore32 New LED class driver: 2016-07-27 14:03:52 -07:00
x86 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-07-27 12:03:20 -07:00
xtensa mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
.gitignore
Kconfig Clarify naming of thread info/stack allocators 2016-06-24 15:09:37 -07:00