Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1380651
| From | Hugh Dickins <hughd@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH mmotm 2/5] huge tmpfs: fix mlocked meminfo track huge unhuge mlocks fix |
| Date | 2016-04-17 01:40 +0200 |
| Message-ID | <roHYJ-35i-1@gated-at.bofh.it> (permalink) |
| References | <roHP4-30O-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Please add this fix after
huge-tmpfs-fix-mlocked-meminfo-track-huge-unhuge-mlocks.patch
for later merging into it. I expect this to fix a build problem found
by robot on an x86_64 randconfig. I was not able to reproduce the error,
but I'm growing to realize that different optimizers behave differently.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
---
mm/rmap.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1445,8 +1445,12 @@ static int try_to_unmap_one(struct page
*/
if (!(flags & TTU_IGNORE_MLOCK)) {
if (vma->vm_flags & VM_LOCKED) {
+ int nr_pages = 1;
+
+ if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) && !pte)
+ nr_pages = HPAGE_PMD_NR;
/* Holding pte lock, we do *not* need mmap_sem here */
- mlock_vma_pages(page, pte ? 1 : HPAGE_PMD_NR);
+ mlock_vma_pages(page, nr_pages);
ret = SWAP_MLOCK;
goto out_unmap;
}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH mmotm 1/5] huge tmpfs: try to allocate huge pages split into a team fix Hugh Dickins <hughd@google.com> - 2016-04-17 01:30 +0200
[PATCH mmotm 2/5] huge tmpfs: fix mlocked meminfo track huge unhuge mlocks fix Hugh Dickins <hughd@google.com> - 2016-04-17 01:40 +0200
Re: [PATCH mmotm 2/5] huge tmpfs: fix mlocked meminfo track huge unhuge mlocks fix Stephen Rothwell <sfr@canb.auug.org.au> - 2016-04-21 01:50 +0200
[PATCH mmotm 4/5] huge tmpfs: avoid premature exposure of new pagetable revert Hugh Dickins <hughd@google.com> - 2016-04-17 01:40 +0200
Re: [PATCH mmotm 4/5] huge tmpfs: avoid premature exposure of new pagetable revert Stephen Rothwell <sfr@canb.auug.org.au> - 2016-04-21 02:00 +0200
[PATCH mmotm 3/5] huge tmpfs recovery: tweak shmem_getpage_gfp to fill team fix Hugh Dickins <hughd@google.com> - 2016-04-17 01:40 +0200
Re: [PATCH mmotm 3/5] huge tmpfs recovery: tweak shmem_getpage_gfp to fill team fix Stephen Rothwell <sfr@canb.auug.org.au> - 2016-04-21 02:00 +0200
[PATCH mmotm 5/5] huge tmpfs: add shmem_pmd_fault() Hugh Dickins <hughd@google.com> - 2016-04-17 01:50 +0200
Re: [PATCH mmotm 5/5] huge tmpfs: add shmem_pmd_fault() "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-04-17 02:50 +0200
Re: [PATCH mmotm 5/5] huge tmpfs: add shmem_pmd_fault() Hugh Dickins <hughd@google.com> - 2016-04-17 03:30 +0200
Re: [PATCH mmotm 5/5] huge tmpfs: add shmem_pmd_fault() Stephen Rothwell <sfr@canb.auug.org.au> - 2016-04-21 02:00 +0200
Re: [PATCH mmotm 1/5] huge tmpfs: try to allocate huge pages split into a team fix Stephen Rothwell <sfr@canb.auug.org.au> - 2016-04-21 01:50 +0200
csiph-web