Skip to content

Commit

Permalink
Merge branch 'akpm' (patches from Andrew)
Browse files Browse the repository at this point in the history
Merge first patchbomb from Andrew Morton:

 - a few misc things

 - ocfs2 udpates

 - kernel/watchdog.c feature work (took ages to get right)

 - most of MM.  A few tricky bits are held up and probably won't make 4.2.

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (91 commits)
  mm: kmemleak_alloc_percpu() should follow the gfp from per_alloc()
  mm, thp: respect MPOL_PREFERRED policy with non-local node
  tmpfs: truncate prealloc blocks past i_size
  mm/memory hotplug: print the last vmemmap region at the end of hot add memory
  mm/mmap.c: optimization of do_mmap_pgoff function
  mm: kmemleak: optimise kmemleak_lock acquiring during kmemleak_scan
  mm: kmemleak: avoid deadlock on the kmemleak object insertion error path
  mm: kmemleak: do not acquire scan_mutex in kmemleak_do_cleanup()
  mm: kmemleak: fix delete_object_*() race when called on the same memory block
  mm: kmemleak: allow safe memory scanning during kmemleak disabling
  memcg: convert mem_cgroup->under_oom from atomic_t to int
  memcg: remove unused mem_cgroup->oom_wakeups
  frontswap: allow multiple backends
  x86, mirror: x86 enabling - find mirrored memory ranges
  mm/memblock: allocate boot time data structures from mirrored memory
  mm/memblock: add extra "flags" to memblock to allow selection of memory based on attribute
  mm: do not ignore mapping_gfp_mask in page cache allocation paths
  mm/cma.c: fix typos in comments
  mm/oom_kill.c: print points as unsigned int
  mm/hugetlb: handle races in alloc_huge_page and hugetlb_reserve_pages
  ...
  • Loading branch information
torvalds committed Jun 25, 2015
2 parents 266da6f + 8a8c35f commit aefbef1
Show file tree
Hide file tree
Showing 151 changed files with 2,277 additions and 1,321 deletions.
18 changes: 18 additions & 0 deletions Documentation/lockup-watchdogs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,21 @@ As explained above, a kernel knob is provided that allows
administrators to configure the period of the hrtimer and the perf
event. The right value for a particular environment is a trade-off
between fast response to lockups and detection overhead.

By default, the watchdog runs on all online cores. However, on a
kernel configured with NO_HZ_FULL, by default the watchdog runs only
on the housekeeping cores, not the cores specified in the "nohz_full"
boot argument. If we allowed the watchdog to run by default on
the "nohz_full" cores, we would have to run timer ticks to activate
the scheduler, which would prevent the "nohz_full" functionality
from protecting the user code on those cores from the kernel.
Of course, disabling it by default on the nohz_full cores means that
when those cores do enter the kernel, by default we will not be
able to detect if they lock up. However, allowing the watchdog
to continue to run on the housekeeping (non-tickless) cores means
that we will continue to detect lockups properly on those cores.

In either case, the set of cores excluded from running the watchdog
may be adjusted via the kernel.watchdog_cpumask sysctl. For
nohz_full cores, this may be useful for debugging a case where the
kernel seems to be hanging on the nohz_full cores.
21 changes: 21 additions & 0 deletions Documentation/sysctl/kernel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,27 @@ and nmi_watchdog.

==============================================================

watchdog_cpumask:

This value can be used to control on which cpus the watchdog may run.
The default cpumask is all possible cores, but if NO_HZ_FULL is
enabled in the kernel config, and cores are specified with the
nohz_full= boot argument, those cores are excluded by default.
Offline cores can be included in this mask, and if the core is later
brought online, the watchdog will be started based on the mask value.

Typically this value would only be touched in the nohz_full case
to re-enable cores that by default were not running the watchdog,
if a kernel lockup was suspected on those cores.

The argument value is the standard cpulist format for cpumasks,
so for example to enable the watchdog on cores 0, 2, 3, and 4 you
might say:

echo 0,2-4 > /proc/sys/kernel/watchdog_cpumask

==============================================================

watchdog_thresh:

This value can be used to control the frequency of hrtimer and NMI
Expand Down
8 changes: 7 additions & 1 deletion Documentation/vm/unevictable-lru.txt
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,13 @@ mmap(MAP_LOCKED) SYSTEM CALL HANDLING

In addition the mlock()/mlockall() system calls, an application can request
that a region of memory be mlocked supplying the MAP_LOCKED flag to the mmap()
call. Furthermore, any mmap() call or brk() call that expands the heap by a
call. There is one important and subtle difference here, though. mmap() + mlock()
will fail if the range cannot be faulted in (e.g. because mm_populate fails)
and returns with ENOMEM while mmap(MAP_LOCKED) will not fail. The mmaped
area will still have properties of the locked area - aka. pages will not get
swapped out - but major page faults to fault memory in might still happen.

Furthermore, any mmap() call or brk() call that expands the heap by a
task that has previously called mlockall() with the MCL_FUTURE flag will result
in the newly mapped memory being mlocked. Before the unevictable/mlock
changes, the kernel simply called make_pages_present() to allocate pages and
Expand Down
15 changes: 15 additions & 0 deletions arch/alpha/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_ALPHA_MM_ARCH_HOOKS_H
#define _ASM_ALPHA_MM_ARCH_HOOKS_H

#endif /* _ASM_ALPHA_MM_ARCH_HOOKS_H */
15 changes: 15 additions & 0 deletions arch/arc/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_ARC_MM_ARCH_HOOKS_H
#define _ASM_ARC_MM_ARCH_HOOKS_H

#endif /* _ASM_ARC_MM_ARCH_HOOKS_H */
4 changes: 0 additions & 4 deletions arch/arm/include/asm/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ static inline int prepare_hugepage_range(struct file *file,
return 0;
}

static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
{
}

static inline int huge_pte_none(pte_t pte)
{
return pte_none(pte);
Expand Down
15 changes: 15 additions & 0 deletions arch/arm/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_ARM_MM_ARCH_HOOKS_H
#define _ASM_ARM_MM_ARCH_HOOKS_H

#endif /* _ASM_ARM_MM_ARCH_HOOKS_H */
5 changes: 0 additions & 5 deletions arch/arm/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ int pud_huge(pud_t pud)
return 0;
}

int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
{
return 0;
}

int pmd_huge(pmd_t pmd)
{
return pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT);
Expand Down
4 changes: 0 additions & 4 deletions arch/arm64/include/asm/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ static inline int prepare_hugepage_range(struct file *file,
return 0;
}

static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
{
}

static inline int huge_pte_none(pte_t pte)
{
return pte_none(pte);
Expand Down
15 changes: 15 additions & 0 deletions arch/arm64/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_ARM64_MM_ARCH_HOOKS_H
#define _ASM_ARM64_MM_ARCH_HOOKS_H

#endif /* _ASM_ARM64_MM_ARCH_HOOKS_H */
7 changes: 0 additions & 7 deletions arch/arm64/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@
#include <asm/tlbflush.h>
#include <asm/pgalloc.h>

#ifndef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
{
return 0;
}
#endif

int pmd_huge(pmd_t pmd)
{
return !(pmd_val(pmd) & PMD_TABLE_BIT);
Expand Down
15 changes: 15 additions & 0 deletions arch/avr32/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_AVR32_MM_ARCH_HOOKS_H
#define _ASM_AVR32_MM_ARCH_HOOKS_H

#endif /* _ASM_AVR32_MM_ARCH_HOOKS_H */
15 changes: 15 additions & 0 deletions arch/blackfin/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_BLACKFIN_MM_ARCH_HOOKS_H
#define _ASM_BLACKFIN_MM_ARCH_HOOKS_H

#endif /* _ASM_BLACKFIN_MM_ARCH_HOOKS_H */
15 changes: 15 additions & 0 deletions arch/c6x/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_C6X_MM_ARCH_HOOKS_H
#define _ASM_C6X_MM_ARCH_HOOKS_H

#endif /* _ASM_C6X_MM_ARCH_HOOKS_H */
15 changes: 15 additions & 0 deletions arch/cris/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_CRIS_MM_ARCH_HOOKS_H
#define _ASM_CRIS_MM_ARCH_HOOKS_H

#endif /* _ASM_CRIS_MM_ARCH_HOOKS_H */
15 changes: 15 additions & 0 deletions arch/frv/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_FRV_MM_ARCH_HOOKS_H
#define _ASM_FRV_MM_ARCH_HOOKS_H

#endif /* _ASM_FRV_MM_ARCH_HOOKS_H */
15 changes: 15 additions & 0 deletions arch/hexagon/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_HEXAGON_MM_ARCH_HOOKS_H
#define _ASM_HEXAGON_MM_ARCH_HOOKS_H

#endif /* _ASM_HEXAGON_MM_ARCH_HOOKS_H */
4 changes: 0 additions & 4 deletions arch/ia64/include/asm/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ static inline int is_hugepage_only_range(struct mm_struct *mm,
REGION_NUMBER((addr)+(len)-1) == RGN_HPAGE);
}

static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
{
}

static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pte)
{
Expand Down
15 changes: 15 additions & 0 deletions arch/ia64/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_IA64_MM_ARCH_HOOKS_H
#define _ASM_IA64_MM_ARCH_HOOKS_H

#endif /* _ASM_IA64_MM_ARCH_HOOKS_H */
5 changes: 0 additions & 5 deletions arch/ia64/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr)
return pte;
}

int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
{
return 0;
}

#define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; }

/*
Expand Down
15 changes: 15 additions & 0 deletions arch/m32r/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_M32R_MM_ARCH_HOOKS_H
#define _ASM_M32R_MM_ARCH_HOOKS_H

#endif /* _ASM_M32R_MM_ARCH_HOOKS_H */
15 changes: 15 additions & 0 deletions arch/m68k/include/asm/mm-arch-hooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Architecture specific mm hooks
*
* Copyright (C) 2015, IBM Corporation
* Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _ASM_M68K_MM_ARCH_HOOKS_H
#define _ASM_M68K_MM_ARCH_HOOKS_H

#endif /* _ASM_M68K_MM_ARCH_HOOKS_H */
14 changes: 9 additions & 5 deletions arch/metag/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,24 @@ dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
}

static inline void
dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sglist, int nelems,
enum dma_data_direction direction)
{
int i;
for (i = 0; i < nelems; i++, sg++)
struct scatterlist *sg;

for_each_sg(sglist, sg, nelems, i)
dma_sync_for_cpu(sg_virt(sg), sg->length, direction);
}

static inline void
dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
enum dma_data_direction direction)
dma_sync_sg_for_device(struct device *dev, struct scatterlist *sglist,
int nelems, enum dma_data_direction direction)
{
int i;
for (i = 0; i < nelems; i++, sg++)
struct scatterlist *sg;

for_each_sg(sglist, sg, nelems, i)
dma_sync_for_device(sg_virt(sg), sg->length, direction);
}

Expand Down
4 changes: 0 additions & 4 deletions arch/metag/include/asm/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ static inline int is_hugepage_only_range(struct mm_struct *mm,
int prepare_hugepage_range(struct file *file, unsigned long addr,
unsigned long len);

static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
{
}

static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb,
unsigned long addr, unsigned long end,
unsigned long floor,
Expand Down
Loading

0 comments on commit aefbef1

Please sign in to comment.