Skip to content

Commit

Permalink
Merge branch 'akpm' (patches from Andrew)
Browse files Browse the repository at this point in the history
Merge second patch-bomb from Andrew Morton:

 - a couple of hotfixes

 - the rest of MM

 - a new timer slack control in procfs

 - a couple of procfs fixes

 - a few misc things

 - some printk tweaks

 - lib/ updates, notably to radix-tree.

 - add my and Nick Piggin's old userspace radix-tree test harness to
   tools/testing/radix-tree/.  Matthew said it was a godsend during the
   radix-tree work he did.

 - a few code-size improvements, switching to __always_inline where gcc
   screwed up.

 - partially implement character sets in sscanf

* emailed patches from Andrew Morton <[email protected]>: (118 commits)
  sscanf: implement basic character sets
  lib/bug.c: use common WARN helper
  param: convert some "on"/"off" users to strtobool
  lib: add "on"/"off" support to kstrtobool
  lib: update single-char callers of strtobool()
  lib: move strtobool() to kstrtobool()
  include/linux/unaligned: force inlining of byteswap operations
  include/uapi/linux/byteorder, swab: force inlining of some byteswap operations
  include/asm-generic/atomic-long.h: force inlining of some atomic_long operations
  usb: common: convert to use match_string() helper
  ide: hpt366: convert to use match_string() helper
  ata: hpt366: convert to use match_string() helper
  power: ab8500: convert to use match_string() helper
  power: charger_manager: convert to use match_string() helper
  drm/edid: convert to use match_string() helper
  pinctrl: convert to use match_string() helper
  device property: convert to use match_string() helper
  lib/string: introduce match_string() helper
  radix-tree tests: add test for radix_tree_iter_next
  radix-tree tests: add regression3 test
  ...
  • Loading branch information
torvalds committed Mar 19, 2016
2 parents 237045f + f9310b2 commit 814a2bf
Show file tree
Hide file tree
Showing 225 changed files with 5,048 additions and 1,915 deletions.
2 changes: 1 addition & 1 deletion Documentation/cgroup-v1/cgroups.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Original copyright statements from cpusets.txt:
Portions Copyright (C) 2004 BULL SA.
Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
Modified by Paul Jackson <[email protected]>
Modified by Christoph Lameter <clameter@sgi.com>
Modified by Christoph Lameter <cl@linux.com>

CONTENTS:
=========
Expand Down
2 changes: 1 addition & 1 deletion Documentation/cgroup-v1/cpusets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Written by [email protected]

Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
Modified by Paul Jackson <[email protected]>
Modified by Christoph Lameter <clameter@sgi.com>
Modified by Christoph Lameter <cl@linux.com>
Modified by Paul Menage <[email protected]>
Modified by Hidetoshi Seto <[email protected]>

Expand Down
25 changes: 25 additions & 0 deletions Documentation/cgroup-v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,15 @@ PAGE_SIZE multiple when read back.
Amount of memory used to cache filesystem data,
including tmpfs and shared memory.

kernel_stack

Amount of memory allocated to kernel stacks.

slab

Amount of memory used for storing in-kernel data
structures.

sock

Amount of memory used in network transmission buffers
Expand Down Expand Up @@ -871,6 +880,16 @@ PAGE_SIZE multiple when read back.
on the internal memory management lists used by the
page reclaim algorithm

slab_reclaimable

Part of "slab" that might be reclaimed, such as
dentries and inodes.

slab_unreclaimable

Part of "slab" that cannot be reclaimed on memory
pressure.

pgfault

Total number of page faults incurred
Expand Down Expand Up @@ -1368,6 +1387,12 @@ system than killing the group. Otherwise, memory.max is there to
limit this type of spillover and ultimately contain buggy or even
malicious applications.

Setting the original memory.limit_in_bytes below the current usage was
subject to a race condition, where concurrent charges could cause the
limit setting to fail. memory.max on the other hand will first set the
limit to prevent new charges, and then reclaim and OOM kill until the
new limit is met - or the task writing to memory.max is killed.

The combined memory+swap accounting and limiting is replaced by real
control over swap space.

Expand Down
18 changes: 18 additions & 0 deletions Documentation/filesystems/proc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Table of Contents
3.7 /proc/<pid>/task/<tid>/children - Information about task children
3.8 /proc/<pid>/fdinfo/<fd> - Information about opened file
3.9 /proc/<pid>/map_files - Information about memory mapped files
3.10 /proc/<pid>/timerslack_ns - Task timerslack value

4 Configuring procfs
4.1 Mount options
Expand Down Expand Up @@ -1862,6 +1863,23 @@ time one can open(2) mappings from the listings of two processes and
comparing their inode numbers to figure out which anonymous memory areas
are actually shared.

3.10 /proc/<pid>/timerslack_ns - Task timerslack value
---------------------------------------------------------
This file provides the value of the task's timerslack value in nanoseconds.
This value specifies a amount of time that normal timers may be deferred
in order to coalesce timers and avoid unnecessary wakeups.

This allows a task's interactivity vs power consumption trade off to be
adjusted.

Writing 0 to the file will set the tasks timerslack to the default value.

Valid values are from 0 - ULLONG_MAX

An application setting the value must have PTRACE_MODE_ATTACH_FSCREDS level
permissions on the task specified to change its timerslack_ns value.


------------------------------------------------------------------------------
Configuring procfs
------------------------------------------------------------------------------
Expand Down
18 changes: 18 additions & 0 deletions Documentation/sysctl/vm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,24 @@ performance impact. Reclaim code needs to take various locks to find freeable
directory and inode objects. With vfs_cache_pressure=1000, it will look for
ten times more freeable objects than there are.

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

watermark_scale_factor:

This factor controls the aggressiveness of kswapd. It defines the
amount of memory left in a node/system before kswapd is woken up and
how much memory needs to be free before kswapd goes back to sleep.

The unit is in fractions of 10,000. The default value of 10 means the
distances between watermarks are 0.1% of the available memory in the
node/system. The maximum value is 1000, or 10% of memory.

A high rate of threads entering direct reclaim (allocstall) or kswapd
going to sleep prematurely (kswapd_low_wmark_hit_quickly) can indicate
that the number of free pages kswapd maintains for latency reasons is
too small for the allocation bursts occurring in the system. This knob
can then be used to tune kswapd aggressiveness accordingly.

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

zone_reclaim_mode:
Expand Down
22 changes: 22 additions & 0 deletions Documentation/vm/transhuge.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,26 @@ guaranteed, but it may be more likely in case the allocation is for a
MADV_HUGEPAGE region.

echo always >/sys/kernel/mm/transparent_hugepage/defrag
echo defer >/sys/kernel/mm/transparent_hugepage/defrag
echo madvise >/sys/kernel/mm/transparent_hugepage/defrag
echo never >/sys/kernel/mm/transparent_hugepage/defrag

"always" means that an application requesting THP will stall on allocation
failure and directly reclaim pages and compact memory in an effort to
allocate a THP immediately. This may be desirable for virtual machines
that benefit heavily from THP use and are willing to delay the VM start
to utilise them.

"defer" means that an application will wake kswapd in the background
to reclaim pages and wake kcompact to compact memory so that THP is
available in the near future. It's the responsibility of khugepaged
to then install the THP pages later.

"madvise" will enter direct reclaim like "always" but only for regions
that are have used madvise(MADV_HUGEPAGE). This is the default behaviour.

"never" should be self-explanatory.

By default kernel tries to use huge zero page on read page fault.
It's possible to disable huge zero page by writing 0 or enable it
back by writing 1:
Expand Down Expand Up @@ -229,6 +246,11 @@ thp_split_page is incremented every time a huge page is split into base
thp_split_page_failed is is incremented if kernel fails to split huge
page. This can happen if the page was pinned by somebody.

thp_deferred_split_page is incremented when a huge page is put onto split
queue. This happens when a huge page is partially unmapped and
splitting it would free up some memory. Pages on split queue are
going to be split under memory pressure.

thp_split_pmd is incremented every time a PMD split into table of PTEs.
This can happen, for instance, when application calls mprotect() or
munmap() on part of huge page. It doesn't split huge page, only
Expand Down
3 changes: 1 addition & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -8498,7 +8498,7 @@ F: include/crypto/pcrypt.h

PER-CPU MEMORY ALLOCATOR
M: Tejun Heo <[email protected]>
M: Christoph Lameter <cl@linux-foundation.org>
M: Christoph Lameter <cl@linux.com>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git
S: Maintained
F: include/linux/percpu*.h
Expand Down Expand Up @@ -11296,7 +11296,6 @@ F: include/linux/cdrom.h
F: include/uapi/linux/cdrom.h

UNISYS S-PAR DRIVERS
M: Benjamin Romer <[email protected]>
M: David Kershner <[email protected]>
L: [email protected] (Unisys internal)
S: Supported
Expand Down
3 changes: 0 additions & 3 deletions arch/arc/include/asm/hugepage.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,16 @@ static inline pmd_t pte_pmd(pte_t pte)
#define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd)))
#define pmd_mkhuge(pmd) pte_pmd(pte_mkhuge(pmd_pte(pmd)))
#define pmd_mknotpresent(pmd) pte_pmd(pte_mknotpresent(pmd_pte(pmd)))
#define pmd_mksplitting(pmd) pte_pmd(pte_mkspecial(pmd_pte(pmd)))
#define pmd_mkclean(pmd) pte_pmd(pte_mkclean(pmd_pte(pmd)))

#define pmd_write(pmd) pte_write(pmd_pte(pmd))
#define pmd_young(pmd) pte_young(pmd_pte(pmd))
#define pmd_pfn(pmd) pte_pfn(pmd_pte(pmd))
#define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd))
#define pmd_special(pmd) pte_special(pmd_pte(pmd))

#define mk_pmd(page, prot) pte_pmd(mk_pte(page, prot))

#define pmd_trans_huge(pmd) (pmd_val(pmd) & _PAGE_HW_SZ)
#define pmd_trans_splitting(pmd) (pmd_trans_huge(pmd) && pmd_special(pmd))

#define pfn_pmd(pfn, prot) (__pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)))

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
up_read(&mm->mmap_sem);

/*
* Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR
* Handle the "normal" case first - VM_FAULT_MAJOR
*/
if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS))))
return 0;
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ static void *__init late_alloc(unsigned long sz)
return ptr;
}

static pte_t * __init pte_alloc(pmd_t *pmd, unsigned long addr,
static pte_t * __init arm_pte_alloc(pmd_t *pmd, unsigned long addr,
unsigned long prot,
void *(*alloc)(unsigned long sz))
{
Expand All @@ -747,7 +747,7 @@ static pte_t * __init pte_alloc(pmd_t *pmd, unsigned long addr,
static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr,
unsigned long prot)
{
return pte_alloc(pmd, addr, prot, early_alloc);
return arm_pte_alloc(pmd, addr, prot, early_alloc);
}

static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr,
Expand All @@ -756,7 +756,7 @@ static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr,
void *(*alloc)(unsigned long sz),
bool ng)
{
pte_t *pte = pte_alloc(pmd, addr, type->prot_l1, alloc);
pte_t *pte = arm_pte_alloc(pmd, addr, type->prot_l1, alloc);
do {
set_pte_ext(pte, pfn_pte(pfn, __pgprot(type->prot_pte)),
ng ? PTE_EXT_NG : 0);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/pgd.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
if (!new_pmd)
goto no_pmd;

new_pte = pte_alloc_map(mm, NULL, new_pmd, 0);
new_pte = pte_alloc_map(mm, new_pmd, 0);
if (!new_pte)
goto no_pte;

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
up_read(&mm->mmap_sem);

/*
* Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR
* Handle the "normal" case first - VM_FAULT_MAJOR
*/
if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP |
VM_FAULT_BADACCESS))))
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm,
* will be no pte_unmap() to correspond with this
* pte_alloc_map().
*/
pte = pte_alloc_map(mm, NULL, pmd, addr);
pte = pte_alloc_map(mm, pmd, addr);
} else if (sz == PMD_SIZE) {
if (IS_ENABLED(CONFIG_ARCH_WANT_HUGE_PMD_SHARE) &&
pud_none(*pud))
Expand Down
1 change: 1 addition & 0 deletions arch/c6x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ config GENERIC_HWEIGHT

config GENERIC_BUG
def_bool y
depends on BUG

config C6X_BIG_KERNEL
bool "Build a big kernel"
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ static inline void __iomem * ioremap_cache (unsigned long phys_addr, unsigned lo
return ioremap(phys_addr, size);
}
#define ioremap_cache ioremap_cache
#define ioremap_uc ioremap_nocache


/*
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (C) 2003 Ken Chen <[email protected]>
* Copyright (C) 2003 Asit Mallick <[email protected]>
* Copyright (C) 2005 Christoph Lameter <clameter@sgi.com>
* Copyright (C) 2005 Christoph Lameter <cl@linux.com>
*
* Based on asm-i386/rwsem.h and other architecture implementation.
*
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz)
if (pud) {
pmd = pmd_alloc(mm, pud, taddr);
if (pmd)
pte = pte_alloc_map(mm, NULL, pmd, taddr);
pte = pte_alloc_map(mm, pmd, taddr);
}
return pte;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/metag/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm,
pgd = pgd_offset(mm, addr);
pud = pud_offset(pgd, addr);
pmd = pmd_offset(pud, addr);
pte = pte_alloc_map(mm, NULL, pmd, addr);
pte = pte_alloc_map(mm, pmd, addr);
pgd->pgd &= ~_PAGE_SZ_MASK;
pgd->pgd |= _PAGE_SZHUGE;

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/mm/gup.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static inline void get_head_page_multiple(struct page *page, int nr)
{
VM_BUG_ON(page != compound_head(page));
VM_BUG_ON(page_count(page) == 0);
atomic_add(nr, &page->_count);
page_ref_add(page, nr);
SetPageReferenced(page);
}

Expand Down
1 change: 1 addition & 0 deletions arch/mn10300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ config GENERIC_HWEIGHT

config GENERIC_BUG
def_bool y
depends on BUG

config QUICKLIST
def_bool y
Expand Down
1 change: 1 addition & 0 deletions arch/mn10300/kernel/fpu-nofpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* 2 of the Licence, or (at your option) any later version.
*/
#include <asm/fpu.h>
#include <asm/elf.h>

/*
* handle an FPU operational exception
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm,
if (pud) {
pmd = pmd_alloc(mm, pud, addr);
if (pmd)
pte = pte_alloc_map(mm, NULL, pmd, addr);
pte = pte_alloc_map(mm, pmd, addr);
}
return pte;
}
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ config PPC
select ARCH_HAS_DEVMEM_IS_ALLOWED
select HAVE_ARCH_SECCOMP_FILTER
select ARCH_HAS_UBSAN_SANITIZE_ALL
select ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT

config GENERIC_CSUM
def_bool CPU_LITTLE_ENDIAN
Expand Down
9 changes: 2 additions & 7 deletions arch/powerpc/kernel/rtasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static unsigned int rtas_error_log_buffer_max;
static unsigned int event_scan;
static unsigned int rtas_event_scan_rate;

static int full_rtas_msgs = 0;
static bool full_rtas_msgs;

/* Stop logging to nvram after first fatal error */
static int logging_enabled; /* Until we initialize everything,
Expand Down Expand Up @@ -592,11 +592,6 @@ __setup("surveillance=", surveillance_setup);

static int __init rtasmsgs_setup(char *str)
{
if (strcmp(str, "on") == 0)
full_rtas_msgs = 1;
else if (strcmp(str, "off") == 0)
full_rtas_msgs = 0;

return 1;
return (kstrtobool(str, &full_rtas_msgs) == 0);
}
__setup("rtasmsgs=", rtasmsgs_setup);
5 changes: 2 additions & 3 deletions arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,8 @@ static int __kprobes __die(const char *str, struct pt_regs *regs, long err)
#ifdef CONFIG_SMP
printk("SMP NR_CPUS=%d ", NR_CPUS);
#endif
#ifdef CONFIG_DEBUG_PAGEALLOC
printk("DEBUG_PAGEALLOC ");
#endif
if (debug_pagealloc_enabled())
printk("DEBUG_PAGEALLOC ");
#ifdef CONFIG_NUMA
printk("NUMA ");
#endif
Expand Down
Loading

0 comments on commit 814a2bf

Please sign in to comment.