Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1492660
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] sparc64 mm: Fix more TSB sizing issues |
| Date | 2016-09-28 17:40 +0200 |
| Message-ID | <smp7I-7L-35@gated-at.bofh.it> (permalink) |
| References | <sckCl-7aI-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Mike Kravetz <mike.kravetz@oracle.com>
Date: Wed, 31 Aug 2016 13:48:19 -0700
> Commit af1b1a9b36b8 ("sparc64 mm: Fix base TSB sizing when hugetlb
> pages are used") addressed the difference between hugetlb and THP
> pages when computing TSB sizes. The following additional issues
> were also discovered while working with the code.
>
> In order to save memory, THP makes use of a huge zero page. This huge
> zero page does not count against a task's RSS, but it does consume TSB
> entries. This is similar to hugetlb pages. Therefore, count huge
> zero page entries in hugetlb_pte_count.
>
> Accounting of THP pages is done in the routine set_pmd_at().
> Unfortunately, this does not catch the case where a THP page is split.
> To handle this case, decrement the count in pmdp_invalidate().
> pmdp_invalidate is only called when splitting a THP. However, 'sanity
> checks' are added in case it is ever called for other purposes.
>
> A more general issue exists with HPAGE_SIZE accounting.
> hugetlb_pte_count tracks the number of HPAGE_SIZE (8M) pages. This
> value is used to size the TSB for HPAGE_SIZE pages. However,
> each HPAGE_SIZE page consists of two REAL_HPAGE_SIZE (4M) pages.
> The TSB contains an entry for each REAL_HPAGE_SIZE page. Therefore,
> the number of REAL_HPAGE_SIZE pages should be used to size the huge
> page TSB. A new compile time constant REAL_HPAGE_PER_HPAGE is used
> to multiply hugetlb_pte_count before sizing the TSB.
>
> Changes from V1
> - Fixed build issue if hugetlb or THP not configured
>
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Applied.
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH v2] sparc64 mm: Fix more TSB sizing issues David Miller <davem@davemloft.net> - 2016-09-28 17:40 +0200
csiph-web