linux-stable/arch/sparc/mm
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
..
extable.c sparc: Add module.h to files previously implicitly using it. 2011-10-31 19:30:54 -04:00
fault_32.c mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
fault_64.c sparc64 mm: Fix base TSB sizing when hugetlb pages are used 2016-07-28 21:22:12 -07:00
gup.c mm/gup: Switch all callers of get_user_pages() to not pass tsk/mm 2016-02-16 10:11:12 +01:00
highmem.c sched/preempt, mm/kmap: Explicitly disable/enable preemption in kmap_atomic_* 2015-05-19 08:39:14 +02:00
hugetlbpage.c sparc64 mm: Fix base TSB sizing when hugetlb pages are used 2016-07-28 21:22:12 -07:00
hypersparc.S [PATCH] sparc32: vm_area_struct access for old Sun SPARCs. 2013-07-10 13:56:10 -07:00
init_32.c sparc32: fix sparse warning in devices.c 2014-04-29 01:12:26 -04:00
init_64.c sparc64 mm: Fix base TSB sizing when hugetlb pages are used 2016-07-28 21:22:12 -07:00
init_64.h sparc64: Use kernel page tables for vmemmap. 2014-10-05 16:53:39 -07:00
io-unit.c sparc32: fix build with STRICT_MM_TYPECHECKS 2016-05-20 17:55:42 -07:00
iommu.c sparc32: fix sparse warning in iommu.c 2014-05-18 19:01:26 -07:00
leon_mm.c sparc32: fix sparse "Should it be static?" in mm/ 2014-04-29 01:12:25 -04:00
Makefile sparc32: introduce run-time patching of srmmu access functions 2012-05-27 23:52:49 -07:00
mm_32.h sparc32: fix sparse "Should it be static?" in mm/ 2014-04-29 01:12:25 -04:00
srmmu.c sparc32: drop superfluous cast in calls to __nocache_pa() 2016-05-20 17:55:42 -07:00
srmmu_access.S sparc32: introduce run-time patching of srmmu access functions 2012-05-27 23:52:49 -07:00
swift.S [PATCH] sparc32: vm_area_struct access for old Sun SPARCs. 2013-07-10 13:56:10 -07:00
tlb.c sparc64 mm: Fix base TSB sizing when hugetlb pages are used 2016-07-28 21:22:12 -07:00
tsb.c sparc64 mm: Fix base TSB sizing when hugetlb pages are used 2016-07-28 21:22:12 -07:00
tsunami.S [PATCH] sparc32: vm_area_struct access for old Sun SPARCs. 2013-07-10 13:56:10 -07:00
ultra.S sparc64: Make PAGE_OFFSET variable. 2013-11-12 15:22:34 -08:00
viking.S [PATCH] sparc32: vm_area_struct access for old Sun SPARCs. 2013-07-10 13:56:10 -07:00