]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
10 years agomm: remap_file_pages: initialize populate before usage
Sasha Levin [Sat, 17 May 2014 13:19:30 +0000 (23:19 +1000)]
mm: remap_file_pages: initialize populate before usage

'populate' wasn't initialized before being used in error paths,
causing panics when mm_populate() would get called with invalid
values.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm-replace-remap_file_pages-syscall-with-emulation-fix
Andrew Morton [Sat, 17 May 2014 13:19:29 +0000 (23:19 +1000)]
mm-replace-remap_file_pages-syscall-with-emulation-fix

fix spello

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Armin Rigo <arigo@tunes.org>
Cc: Dave Jones <davej@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm: replace remap_file_pages() syscall with emulation
Kirill A. Shutemov [Sat, 17 May 2014 13:19:29 +0000 (23:19 +1000)]
mm: replace remap_file_pages() syscall with emulation

remap_file_pages(2) was invented to be able efficiently map parts of huge
file into limited 32-bit virtual address space such as in database
workloads.

Nonlinear mappings are pain to support and it seems there's no legitimate
use-cases nowadays since 64-bit systems are widely available.

Let's drop it and get rid of all these special-cased code.

The patch replaces the syscall with emulation which creates new VMA on
each remap_file_pages(), unless they it can be merged with an adjacent
one.

I didn't find *any* real code that uses remap_file_pages(2) to test
emulation impact on.  I've checked Debian code search and source of all
packages in ALT Linux.  No real users: libc wrappers, mentions in strace,
gdb, valgrind and this kind of stuff.

There are few basic tests in LTP for the syscall. They work just fine
with emulation.

To test performance impact, I've written small test case which demonstrate
pretty much worst case scenario: map 4G shmfs file, write to begin of
every page pgoff of the page, remap pages in reverse order, read every
page.

The test creates 1 million of VMAs if emulation is in use, so I had to set
vm.max_map_count to 1100000 to avoid -ENOMEM.

Before: 23.3 ( +-  4.31% ) seconds
After: 43.9 ( +-  0.85% ) seconds
Slowdown: 1.88x

I believe we can live with that.

Test case:

#define _GNU_SOURCE
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>

#define MB (1024UL * 1024)
#define SIZE (4096 * MB)

int main(int argc, char **argv)
{
unsigned long *p;
long i, pass;

for (pass = 0; pass < 10; pass++) {
p = mmap(NULL, SIZE, PROT_READ|PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0);
if (p == MAP_FAILED) {
perror("mmap");
return -1;
}

for (i = 0; i < SIZE / 4096; i++)
p[i * 4096 / sizeof(*p)] = i;

for (i = 0; i < SIZE / 4096; i++) {
if (remap_file_pages(p + i * 4096 / sizeof(*p), 4096,
0, (SIZE - 4096 * (i + 1)) >> 12, 0)) {
perror("remap_file_pages");
return -1;
}
}

for (i = SIZE / 4096 - 1; i >= 0; i--)
assert(p[i * 4096 / sizeof(*p)] == SIZE / 4096 - i - 1);

munmap(p, SIZE);
}

return 0;
}

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Dave Jones <davej@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Armin Rigo <arigo@tunes.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm-mark-remap_file_pages-syscall-as-deprecated-fix
Andrew Morton [Sat, 17 May 2014 13:19:29 +0000 (23:19 +1000)]
mm-mark-remap_file_pages-syscall-as-deprecated-fix

fix spello

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Armin Rigo <arigo@tunes.org>
Cc: Dave Jones <davej@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm: mark remap_file_pages() syscall as deprecated
Kirill A. Shutemov [Sat, 17 May 2014 13:19:29 +0000 (23:19 +1000)]
mm: mark remap_file_pages() syscall as deprecated

The remap_file_pages() system call is used to create a nonlinear mapping,
that is, a mapping in which the pages of the file are mapped into a
nonsequential order in memory.  The advantage of using remap_file_pages()
over using repeated calls to mmap(2) is that the former approach does not
require the kernel to create additional VMA (Virtual Memory Area) data
structures.

Supporting of nonlinear mapping requires significant amount of non-trivial
code in kernel virtual memory subsystem including hot paths.  Also to get
nonlinear mapping work kernel need a way to distinguish normal page table
entries from entries with file offset (pte_file).  Kernel reserves flag in
PTE for this purpose.  PTE flags are scarce resource especially on some
CPU architectures.  It would be nice to free up the flag for other usage.

Fortunately, there are not many users of remap_file_pages() in the wild.
It's only known that one enterprise RDBMS implementation uses the syscall
on 32-bit systems to map files bigger than can linearly fit into 32-bit
virtual address space.  This use-case is not critical anymore since 64-bit
systems are widely available.

The plan is to deprecate the syscall and replace it with an emulation.
The emulation will create new VMAs instead of nonlinear mappings.  It's
going to work slower for rare users of remap_file_pages() but ABI is
preserved.

One side effect of emulation (apart from performance) is that user can hit
vm.max_map_count limit more easily due to additional VMAs.  See comment
for DEFAULT_MAX_MAP_COUNT for more details on the limit.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Dave Jones <davej@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Armin Rigo <arigo@tunes.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm: memcontrol: remove unnecessary memcg argument from soft limit functions
Johannes Weiner [Sat, 17 May 2014 13:19:28 +0000 (23:19 +1000)]
mm: memcontrol: remove unnecessary memcg argument from soft limit functions

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm: memcontrol: clean up memcg zoneinfo lookup
Jianyu Zhan [Sat, 17 May 2014 13:19:28 +0000 (23:19 +1000)]
mm: memcontrol: clean up memcg zoneinfo lookup

Memcg zoneinfo lookup sites have either the page, the zone, or the node id
and zone index, but sites that only have the zone have to look up the node
id and zone index themselves, whereas sites that already have those two
integers use a function for a simple pointer chase.

Provide mem_cgroup_zone_zoneinfo() that takes a zone pointer and let sites
that already have node id and zone index - all for each node, for each
zone iterators - use &memcg->nodeinfo[nid]->zoneinfo[zid].

Rename page_cgroup_zoneinfo() to mem_cgroup_page_zoneinfo() to match.

Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm/memblock.c: call kmemleak directly from memblock_(alloc|free)
Catalin Marinas [Sat, 17 May 2014 13:19:28 +0000 (23:19 +1000)]
mm/memblock.c: call kmemleak directly from memblock_(alloc|free)

Kmemleak could ignore memory blocks allocated via memblock_alloc() leading
to false positives during scanning.  This patch adds the corresponding
callbacks and removes kmemleak_free_* calls in mm/nobootmem.c to avoid
duplication.  The kmemleak_alloc() in mm/nobootmem.c is kept since
__alloc_memory_core_early() does not use memblock_alloc() directly.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm/mempool.c: update the kmemleak stack trace for mempool allocations
Catalin Marinas [Sat, 17 May 2014 13:19:28 +0000 (23:19 +1000)]
mm/mempool.c: update the kmemleak stack trace for mempool allocations

When mempool_alloc() returns an existing pool object, kmemleak_alloc() is
no longer called and the stack trace corresponds to the original object
allocation.  This patch updates the kmemleak allocation stack trace for
such objects to make it more useful for debugging.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agolib/radix-tree.c: update the kmemleak stack trace for radix tree allocations
Catalin Marinas [Sat, 17 May 2014 13:19:27 +0000 (23:19 +1000)]
lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations

Since radix_tree_preload() stack trace is not always useful for debugging
an actual radix tree memory leak, this patch updates the kmemleak
allocation stack trace in the radix_tree_node_alloc() function.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm: introduce kmemleak_update_trace()
Catalin Marinas [Sat, 17 May 2014 13:19:27 +0000 (23:19 +1000)]
mm: introduce kmemleak_update_trace()

The memory allocation stack trace is not always useful for debugging a
memory leak (e.g.  radix_tree_preload).  This function, when called,
updates the stack trace for an already allocated object.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm/kmemleak.c: use %u to print ->checksum
Jianpeng Ma [Sat, 17 May 2014 13:19:27 +0000 (23:19 +1000)]
mm/kmemleak.c: use %u to print ->checksum

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agovmscan: memcg: always use swappiness of the reclaimed memcg
Michal Hocko [Sat, 17 May 2014 13:19:27 +0000 (23:19 +1000)]
vmscan: memcg: always use swappiness of the reclaimed memcg

Memory reclaim always uses swappiness of the reclaim target memcg (origin
of the memory pressure) or vm_swappiness for global memory reclaim.  This
behavior was consistent (except for difference between global and hard
limit reclaim) because swappiness was enforced to be consistent within
each memcg hierarchy.

After "mm: memcontrol: remove hierarchy restrictions for swappiness and
oom_control" each memcg can have its own swappiness independent of
hierarchical parents, though, so the consistency guarantee is gone.  This
can lead to an unexpected behavior.  Say that a group is explicitly
configured to not swapout by memory.swappiness=0 but its memory gets
swapped out anyway when the memory pressure comes from its parent with a
It is also unexpected that the knob is meaningless without setting the
hard limit which would trigger the reclaim and enforce the swappiness.
There are setups where the hard limit is configured higher in the
hierarchy by an administrator and children groups are under control of
somebody else who is interested in the swapout behavior but not
necessarily about the memory limit.

From a semantic point of view swappiness is an attribute defining anon vs.
 file proportional scanning of LRU which is memcg specific (unlike charges
which are propagated up the hierarchy) so it should be applied to the
particular memcg's LRU regardless where the memory pressure comes from.

This patch removes vmscan_swappiness() and stores the swappiness into the
scan_control structure.  mem_cgroup_swappiness is then used to provide the
correct value before shrink_lruvec is called.  The global vm_swappiness is
used for the root memcg.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomemcg: document memory.low_limit_in_bytes
Michal Hocko [Sat, 17 May 2014 13:19:26 +0000 (23:19 +1000)]
memcg: document memory.low_limit_in_bytes

Describe low_limit_in_bytes and its effect.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Roman Gushchin <klamm@yandex-team.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomemcg-doc-clarify-global-vs-limit-reclaims-fix
Michal Hocko [Sat, 17 May 2014 13:19:26 +0000 (23:19 +1000)]
memcg-doc-clarify-global-vs-limit-reclaims-fix

update doc as per Johannes

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Roman Gushchin <klamm@yandex-team.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomemcg, doc: clarify global vs. limit reclaims
Michal Hocko [Sat, 17 May 2014 13:19:26 +0000 (23:19 +1000)]
memcg, doc: clarify global vs. limit reclaims

Be explicit about global and hard limit reclaims in our documentation.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Roman Gushchin <klamm@yandex-team.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomemcg: allow setting low_limit
Michal Hocko [Sat, 17 May 2014 13:19:26 +0000 (23:19 +1000)]
memcg: allow setting low_limit

Export memory.low_limit_in_bytes knob with the same rules as the hard
limit represented by limit_in_bytes knob (e.g.  no limit to be set for the
root cgroup).  There is no memsw alternative for low_limit_in_bytes
because the primary motivation behind this limit is to protect the working
set of the group and so considering swap doesn't make much sense.  There
is also no kmem variant exported because we do not have any easy way to
protect kernel allocations now.

Please note that the low limit might exceed the hard limit which basically
means that the group is not reclaimable if there is other reclaim target
in the hierarchy under pressure.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Roman Gushchin <klamm@yandex-team.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomemcg-mm-introduce-lowlimit-reclaim-fix
Michal Hocko [Sat, 17 May 2014 13:19:25 +0000 (23:19 +1000)]
memcg-mm-introduce-lowlimit-reclaim-fix

mem_cgroup_reclaim_eligible -> mem_cgroup_within_guarantee
follow_low_limit -> honor_memcg_guarantee
and as suggested by Johannes.

Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Roman Gushchin <klamm@yandex-team.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomemcg, mm: introduce lowlimit reclaim
Michal Hocko [Sat, 17 May 2014 13:19:25 +0000 (23:19 +1000)]
memcg, mm: introduce lowlimit reclaim

Previous discussions have shown that soft limits cannot be reformed
(http://lwn.net/Articles/555249/).  This series introduces an alternative
approach for protecting memory allocated to processes executing within a
memory cgroup controller.  It is based on a new tunable that was discussed
with Johannes and Tejun held during the kernel summit 2013 and at LSF
2014.

This patchset introduces such low limit that is functionally similar to a
minimum guarantee.  Memcgs which are under their lowlimit are not
considered eligible for the reclaim (both global and hardlimit) unless all
groups under the reclaimed hierarchy are below the low limit when all of
them are considered eligible.

The previous version of the patchset posted as a RFC
(http://marc.info/?l=linux-mm&m=138677140628677&w=2) suggested a hard
guarantee without any fallback.  More discussions led me to reconsidering
the default behavior and come up a more relaxed one.  The hard requirement
can be added later based on a use case which really requires.  It would be
controlled by memory.reclaim_flags knob which would specify whether to OOM
or fallback (default) when all groups are bellow low limit.

The default value of the limit is 0 so all groups are eligible by default
and an interested party has to explicitly set the limit.

The primary use case is to protect an amount of memory allocated to a
workload without it being reclaimed by an unrelated activity.  In some
cases this requirement can be fulfilled by mlock but it is not suitable
for many loads and generally requires application awareness.  Such
application awareness can be complex.  It effectively forbids the use of
memory overcommit as the application must explicitly manage memory
residency.

With the low limit, such workloads can be placed in a memcg with a low
limit that protects the estimated working set.

The hierarchical behavior of the lowlimit is described in the first patch.
 The second patch allows setting the lowlimit.  The last 2 patches clarify
documentation about the memcg reclaim in gereneral (3rd patch) and low
limit (4th patch).

This patch (of 4)

This patch introduces low limit reclaim.  The low_limit acts as a reclaim
protection because groups which are under their low_limit are considered
ineligible for reclaim.  While hardlimit protects from using more memory
than allowed lowlimit protects from getting below memory assigned to the
group due to external memory pressure.

More precisely a group is considered eligible for the reclaim under a
specific hierarchy represented by its root only if the group is above its
low limit and the same applies to all parents up the hierarchy to the
root.  Nevertheless the limit still might be ignored if all groups under
the reclaimed hierarchy are under their low limits.  This will prevent
from OOM rather than protecting the memory.

Consider the following hierarchy with memory pressure coming from the
group A (hard limit reclaim - l-low_limit_in_bytes, u-usage_in_bytes,
h-limit_in_bytes):

root_mem_cgroup
.
  _____/
 /
A (l = 80 u=90 h=90)
       /
      / \_________
     /            \
    B (l=0 u=50)   C (l=50 u=40)
                    \
     D (l=0 u=30)

A and B are reclaimable but C and D are not (D is protected by C).

The low_limit is 0 by default so every group is eligible.  This patch
doesn't provide a way to set the limit yet although the core
infrastructure is there already.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Roman Gushchin <klamm@yandex-team.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agosysrq,rcu: suppress RCU stall warnings while sysrq runs
Rik van Riel [Sat, 17 May 2014 13:19:25 +0000 (23:19 +1000)]
sysrq,rcu: suppress RCU stall warnings while sysrq runs

Some sysrq handlers can run for a long time, because they dump a lot of
data onto a serial console.  Having RCU stall warnings pop up in the
middle of them only makes the problem worse.

This patch temporarily disables RCU stall warnings while a sysrq request
is handled.

Signed-off-by: Rik van Riel <riel@redhat.com>
Suggested-by: Paul McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Madper Xie <cxie@redhat.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agosysrq: rcu-ify __handle_sysrq
Rik van Riel [Sat, 17 May 2014 13:19:25 +0000 (23:19 +1000)]
sysrq: rcu-ify __handle_sysrq

Echoing values into /proc/sysrq-trigger seems to be a popular way to get
information out of the kernel.  However, dumping information about
thousands of processes, or hundreds of CPUs to serial console can result
in IRQs being blocked for minutes, resulting in various kinds of cascade
failures.

The most common failure is due to interrupts being blocked for a very long
time.  This can lead to things like failed IO requests, and other things
the system cannot easily recover from.

This problem is easily fixable by making __handle_sysrq use RCU instead of
spin_lock_irqsave.

This leaves the warning that RCU grace periods have not elapsed for a long
time, but the system will come back from that automatically.

It also leaves sysrq-from-irq-context when the sysrq keys are pressed, but
that is probably desired since people want that to work in situations
where the system is already hosed.

The callers of register_sysrq_key and unregister_sysrq_key appear to be
capable of sleeping.

Signed-off-by: Rik van Riel <riel@redhat.com>
Reported-by: Madper Xie <cxie@redhat.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agokernel/kprobes.c: convert printk to pr_foo()
Fabian Frederick [Sat, 17 May 2014 13:19:24 +0000 (23:19 +1000)]
kernel/kprobes.c: convert printk to pr_foo()

Also fixes some checkpatch warnings
-Static initialization
-Lines over 80 characters

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agox86,vdso: fix an OOPS accessing the hpet mapping w/o an hpet
Andy Lutomirski [Sat, 17 May 2014 13:19:24 +0000 (23:19 +1000)]
x86,vdso: fix an OOPS accessing the hpet mapping w/o an hpet

The oops can be triggered in qemu using -no-hpet (but not nohpet) by
reading a couple of pages past the end of the vdso text.  This should send
SIGBUS instead of OOPSing.

The bug was introduced by:

commit 7a59ed415f5b57469e22e41fc4188d5399e0b194
Author: Stefani Seibold <stefani@seibold.net>
Date:   Mon Mar 17 23:22:09 2014 +0100

    x86, vdso: Add 32 bit VDSO time support for 32 bit kernel

which is new in 3.15.

This will be fixed separately in 3.15, but that patch will not apply to
tip/x86/vdso.  This is the equivalent fix for tip/x86/vdso and,
presumably, 3.16.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stefani Seibold <stefani@seibold.net>
Cc: <stable@vger.kernel.org> [needs rework for 3.15 and earlier]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agorwsem-support-optimistic-spinning-checkpatch-fixes
Andrew Morton [Sat, 17 May 2014 13:19:24 +0000 (23:19 +1000)]
rwsem-support-optimistic-spinning-checkpatch-fixes

WARNING: line over 80 characters
#205: FILE: kernel/locking/rwsem-xadd.c:275:
+ old = cmpxchg(&sem->count, count, count + RWSEM_ACTIVE_WRITE_BIAS);

WARNING: line over 80 characters
#376: FILE: kernel/locking/rwsem-xadd.c:434:
+  * If there were already threads queued before us and there are no

WARNING: line over 80 characters
#377: FILE: kernel/locking/rwsem-xadd.c:435:
+  * active writers, the lock must be read owned; so we try to wake

total: 0 errors, 3 warnings, 417 lines checked

./patches/rwsem-support-optimistic-spinning.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Davidlohr Bueso <davidlohr@hp.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agorwsem: Support optimistic spinning
Davidlohr Bueso [Sat, 17 May 2014 13:19:24 +0000 (23:19 +1000)]
rwsem: Support optimistic spinning

We have reached the point where our mutexes are quite fine tuned for a
number of situations.  This includes the use of heuristics and optimistic
spinning, based on MCS locking techniques.

Exclusive ownership of read-write semaphores are, conceptually, just about
the same as mutexes, making them close cousins.  To this end we need to
make them both perform similarly, and right now, rwsems are simply not up
to it.  This was discovered by both reverting commit 4fc3f1d6 (mm/rmap,
migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable)
and similarly, converting some other mutexes (ie: i_mmap_mutex) to rwsems.
 This creates a situation where users have to choose between a rwsem and
mutex taking into account this important performance difference.
Specifically, biggest difference between both locks is when we fail to
acquire a mutex in the fastpath, optimistic spinning comes in to play and
we can avoid a large amount of unnecessary sleeping and overhead of moving
tasks in and out of wait queue.  Rwsems do not have such logic.

This patch, based on the work from Tim Chen and I, adds support for
write-side optimistic spinning when the lock is contended.  It also
includes support for the recently added cancelable MCS locking for
adaptive spinning.  Note that is is only applicable to the xadd method,
and the spinlock rwsem variant remains intact.

Allowing optimistic spinning before putting the writer on the wait queue
reduces wait queue contention and provided greater chance for the rwsem to
get acquired.  With these changes, rwsem is on par with mutex.  The
performance benefits can be seen on a number of workloads.  For instance,
on a 8 socket, 80 core 64bit Westmere box, aim7 shows the following
improvements in throughput:

+--------------+---------------------+-----------------+
|   Workload   | throughput-increase | number of users |
+--------------+---------------------+-----------------+
| alltests     | 20%                 | >1000           |
| custom       | 27%, 60%            | 10-100, >1000   |
| high_systime | 36%, 30%            | >100, >1000     |
| shared       | 58%, 29%            | 10-100, >1000   |
+--------------+---------------------+-----------------+

There was also improvement on smaller systems, such as a quad-core x86-64
laptop running a 30Gb PostgreSQL (pgbench) workload for up to +60% in
throughput for over 50 clients.  Additionally, benefits were also noticed
in exim (mail server) workloads.  When comparing against regular
non-blocking rw locks ([q]rwlock_t), this change proves that it can
outperform them, for instance when studying the popular anon-vma lock:

http://www.spinics.net/lists/linux-mm/msg72705.html

Furthermore, no performance regression have been seen at all.

This patch applies on top of the -tip branch.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agofs/reiserfs/stree.c: remove obsolete __constant
Fabian Frederick [Sat, 17 May 2014 13:19:23 +0000 (23:19 +1000)]
fs/reiserfs/stree.c: remove obsolete __constant

__constant_cpu_to_le32 converted to cpu_to_le32

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agofs/reiserfs/bitmap.c: coding style fixes
Fabian Frederick [Sat, 17 May 2014 13:19:23 +0000 (23:19 +1000)]
fs/reiserfs/bitmap.c: coding style fixes

-Trivial code clean-up
-Fix endif }; (coccinelle warning)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agoinit/main.c: code clean-up
Fabian Frederick [Sat, 17 May 2014 13:19:23 +0000 (23:19 +1000)]
init/main.c: code clean-up

Fixing some checkpatch warnings(remove global initialization, move
__initdata, coalesce formats ...)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agokernel/watchdog.c: convert printk/pr_warning to pr_foo()
Fabian Frederick [Sat, 17 May 2014 13:19:23 +0000 (23:19 +1000)]
kernel/watchdog.c: convert printk/pr_warning to pr_foo()

Replace some obsolete functions.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agokernel-watchdogc-print-traces-for-all-cpus-on-lockup-detection-fix-2
Jan Moskyto Matejka [Sat, 17 May 2014 13:19:22 +0000 (23:19 +1000)]
kernel-watchdogc-print-traces-for-all-cpus-on-lockup-detection-fix-2

This commit fixes this warning:

kernel/watchdog.c: In function `watchdog_timer_fn':
kernel/watchdog.c:368:4: warning: `smp_mb__after_clear_bit' is deprecated (declared at include/linux/bitops.h:48) [-Wdeprecated-declarations]
    smp_mb__after_clear_bit();

That code was introduced in commit 90e6b763ca8a5eb739e59489f42d45e13431d157
("kernel/watchdog.c: print traces for all cpus on lockup detection") and then
merged with another branch containing commit
febdbfe8a91ce0d11939d4940b592eb0dba8d663 ("arch: Prepare for
smp_mb__{before,after}_atomic()") which deprecates the
smp_mb__after_clear_bit() call in favour of smp_mb__after_atomic().

Signed-off-by: Jan Moskyto Matejka <mq@suse.cz>
Acked-by: Aaron Tomlin <atomlin@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agokernel-watchdogc-print-traces-for-all-cpus-on-lockup-detection-fix
Andrew Morton [Sat, 17 May 2014 13:19:22 +0000 (23:19 +1000)]
kernel-watchdogc-print-traces-for-all-cpus-on-lockup-detection-fix

additional CONFIG_SMP=n optimisations

Cc: Aaron Tomlin <atomlin@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Mateusz Guzik <mguzik@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agokernel/watchdog.c: print traces for all cpus on lockup detection
Aaron Tomlin [Sat, 17 May 2014 13:19:22 +0000 (23:19 +1000)]
kernel/watchdog.c: print traces for all cpus on lockup detection

A 'softlockup' is defined as a bug that causes the kernel to loop in
kernel mode for more than a predefined period to time, without giving
other tasks a chance to run.

Currently, upon detection of this condition by the per-cpu watchdog task,
debug information (including a stack trace) is sent to the system log.

On some occasions, we have observed that the "victim" rather than the
actual "culprit" (i.e.  the owner/holder of the contended resource) is
reported to the user.  Often this information has proven to be
insufficient to assist debugging efforts.

To avoid loss of useful debug information, for architectures which support
NMI, this patch makes it possible to improve soft lockup reporting.  This
is accomplished by issuing an NMI to each cpu to obtain a stack trace.

If NMI is not supported we just revert back to the old method.  A sysctl
and boot-time parameter is available to toggle this feature.

[dzickus@redhat.com: add CONFIG_SMP in certain areas]
Signed-off-by: Aaron Tomlin <atomlin@redhat.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Mateusz Guzik <mguzik@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agoblackfin/ptrace: call find_vma with the mmap_sem held
Davidlohr Bueso [Sat, 17 May 2014 13:19:22 +0000 (23:19 +1000)]
blackfin/ptrace: call find_vma with the mmap_sem held

Performing vma lookups without taking the mm->mmap_sem is asking for
trouble.  While doing the search, the vma in question can be modified or
even removed before returning to the caller.  Take the lock (shared) in
order to avoid races while iterating through the vmacache and/or rbtree.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Cc: Steven Miao <realmz6@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agortc: s5m: consolidate two device type switch statements
Krzysztof Kozlowski [Sat, 17 May 2014 13:19:21 +0000 (23:19 +1000)]
rtc: s5m: consolidate two device type switch statements

In probe the configuration of driver for different chipsets was done in
two switch (pdata->device_type) statements.  Consolidate them into one
switch statement to increase code readability.

Additionally check the return value of regmap_irq_get_virq and exit probe
on error.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agortc: s5m: add support for S2MPS14 RTC
Krzysztof Kozlowski [Sat, 17 May 2014 13:19:21 +0000 (23:19 +1000)]
rtc: s5m: add support for S2MPS14 RTC

Add support for S2MPS14 to the rtc-s5m driver. Differences in S2MPS14
(in comparison to S5M8767):

 - Layout of registers;
 - Lack of century support for time and alarms (7 registers used for
   storing time/alarm);
 - Two buffer control registers: WUDR and RUDR;
 - No register for enabling writing time;
 - RTC interrupts are reported in main PMIC I2C device;

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agortc: s5m: support different register layout
Krzysztof Kozlowski [Sat, 17 May 2014 13:19:21 +0000 (23:19 +1000)]
rtc: s5m: support different register layout

Prepare for adding support for S2MPS14 RTC device to the
rtc-s5m driver:

1. Add a map of registers used by the driver which differ between
   the chipsets (S5M876X and S2MPS14).

2. Move code of checking for alarm pending to separate function.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agortc: s5m: use shorter time of register update
Krzysztof Kozlowski [Sat, 17 May 2014 13:19:21 +0000 (23:19 +1000)]
rtc: s5m: use shorter time of register update

Set the time needed for updating alarm and time registers to 0.45 ms.
The default is 7.32 ms which is too long and leads to warnings when
setting alarm or time:

s5m-rtc: waiting for UDR update, reached max number of retries

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agortc: s5m: remove undocumented time init on first boot
Krzysztof Kozlowski [Sat, 17 May 2014 13:19:20 +0000 (23:19 +1000)]
rtc: s5m: remove undocumented time init on first boot

Remove the code for initializing time if this is first boot.

The code for detecting first boot uses undocumented field RTC_TCON in
RTC_UDR_CON register.  According to S5M8767's datasheet this field is
reserved.  On S2MPS14 it is not documented at all.  On device first boot
the registers will be initialized with reset value (2000-01-01 00:00:00).

The code might work on S5M8763 but still this does not look like a task
for RTC driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomfd/rtc: sec/s5m: rename SEC* symbols to S5M
Krzysztof Kozlowski [Sat, 17 May 2014 13:19:20 +0000 (23:19 +1000)]
mfd/rtc: sec/s5m: rename SEC* symbols to S5M

Prepare for adding support for S2MPS14 RTC device to the rtc-s5m driver:

1. Rename SEC* symbols to S5M.
2. Add S5M prefix to some of defines which are different between S5M876X
   and S2MPS14.

This is only a rename-like patch, new code is not added.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:20 +0000 (23:19 +1000)]
mm: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agosysctl: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:20 +0000 (23:19 +1000)]
sysctl: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agoipc: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:19 +0000 (23:19 +1000)]
ipc: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agokey: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:19 +0000 (23:19 +1000)]
key: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agofs: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:19 +0000 (23:19 +1000)]
fs: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agontfs: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:19 +0000 (23:19 +1000)]
ntfs: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agoinotify: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:18 +0000 (23:19 +1000)]
inotify: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agonfs: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:18 +0000 (23:19 +1000)]
nfs: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agolockd: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:18 +0000 (23:19 +1000)]
lockd: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agofscache: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:18 +0000 (23:19 +1000)]
fscache: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agocoda: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:17 +0000 (23:19 +1000)]
coda: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agoscsi: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:17 +0000 (23:19 +1000)]
scsi: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agoparport: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:17 +0000 (23:19 +1000)]
parport: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agorandom: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:17 +0000 (23:19 +1000)]
random: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agocdrom: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:16 +0000 (23:19 +1000)]
cdrom: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agotile: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:16 +0000 (23:19 +1000)]
tile: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agoia64: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:16 +0000 (23:19 +1000)]
ia64: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agoarm: convert use of typedef ctl_table to struct ctl_table
Joe Perches [Sat, 17 May 2014 13:19:16 +0000 (23:19 +1000)]
arm: convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agolib/test_bpf.c: don't use gcc union shortcut
Andrew Morton [Sat, 17 May 2014 13:19:15 +0000 (23:19 +1000)]
lib/test_bpf.c: don't use gcc union shortcut

Older gcc's (mine is gcc-4.4.4) make a mess of this.

lib/test_bpf.c:74: error: unknown field 'insns' specified in initializer
lib/test_bpf.c:75: warning: missing braces around initializer
lib/test_bpf.c:75: warning: (near initialization for 'tests[0].<anonymous>.insns[0]')
lib/test_bpf.c:76: error: extra brace group at end of initializer
lib/test_bpf.c:76: error: (near initialization for 'tests[0].<anonymous>')
lib/test_bpf.c:76: warning: excess elements in union initializer
lib/test_bpf.c:76: warning: (near initialization for 'tests[0].<anonymous>')
lib/test_bpf.c:77: error: extra brace group at end of initializer

Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agomm/page_io.c: work around gcc bug
Andrew Morton [Sat, 17 May 2014 13:19:15 +0000 (23:19 +1000)]
mm/page_io.c: work around gcc bug

gcc-4.4.4 (at least) screws up this initialization.

mm/page_io.c: In function '__swap_writepage':
mm/page_io.c:277: error: unknown field 'bvec' specified in initializer
mm/page_io.c:278: warning: excess elements in struct initializer
mm/page_io.c:278: warning: (near initialization for 'from')

Fixes f990bbc9bfa3cbd2d ("bio_vec-backed iov_iter").

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agodrivers/gpio/gpio-zevio.c: fix build
Andrew Morton [Sat, 17 May 2014 13:19:15 +0000 (23:19 +1000)]
drivers/gpio/gpio-zevio.c: fix build

Unbreak i386 allmodconfig.

This is a hack - please fix properly ;)

Cc: Fabian Vogt <fabian@ritter-vogt.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 years agoMerge branch 'akpm-current/current'
Stephen Rothwell [Tue, 20 May 2014 08:02:19 +0000 (18:02 +1000)]
Merge branch 'akpm-current/current'

Conflicts:
mm/memcontrol.c

10 years agoRevert "mfd: stmpe: root out static GPIO and IRQ assignments"
Stephen Rothwell [Tue, 20 May 2014 08:00:11 +0000 (18:00 +1000)]
Revert "mfd: stmpe: root out static GPIO and IRQ assignments"

This reverts commit 3ba1d516d5feddba3e13d30d31a70da130a3ee0e.

10 years agoMerge branch 'rd-docs/master'
Stephen Rothwell [Tue, 20 May 2014 07:34:14 +0000 (17:34 +1000)]
Merge branch 'rd-docs/master'

10 years agoMerge remote-tracking branch 'llvmlinux/for-next'
Stephen Rothwell [Tue, 20 May 2014 07:32:43 +0000 (17:32 +1000)]
Merge remote-tracking branch 'llvmlinux/for-next'

10 years agoMerge remote-tracking branch 'aio/master'
Stephen Rothwell [Tue, 20 May 2014 07:31:26 +0000 (17:31 +1000)]
Merge remote-tracking branch 'aio/master'

10 years agoMerge remote-tracking branch 'lzo-update/lzo-update'
Stephen Rothwell [Tue, 20 May 2014 07:29:54 +0000 (17:29 +1000)]
Merge remote-tracking branch 'lzo-update/lzo-update'

10 years agoMerge remote-tracking branch 'random/dev'
Stephen Rothwell [Tue, 20 May 2014 07:28:37 +0000 (17:28 +1000)]
Merge remote-tracking branch 'random/dev'

10 years agoMerge remote-tracking branch 'clk/clk-next'
Stephen Rothwell [Tue, 20 May 2014 07:27:22 +0000 (17:27 +1000)]
Merge remote-tracking branch 'clk/clk-next'

Conflicts:
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt

10 years agoMerge remote-tracking branch 'ktest/for-next'
Stephen Rothwell [Tue, 20 May 2014 07:26:26 +0000 (17:26 +1000)]
Merge remote-tracking branch 'ktest/for-next'

10 years agoMerge remote-tracking branch 'userns/for-next'
Stephen Rothwell [Tue, 20 May 2014 07:16:53 +0000 (17:16 +1000)]
Merge remote-tracking branch 'userns/for-next'

Conflicts:
fs/dcache.c
fs/namei.c
fs/namespace.c

10 years agoMerge remote-tracking branch 'pwm/for-next'
Stephen Rothwell [Tue, 20 May 2014 06:49:47 +0000 (16:49 +1000)]
Merge remote-tracking branch 'pwm/for-next'

10 years agoMerge remote-tracking branch 'dma-mapping/dma-mapping-next'
Stephen Rothwell [Tue, 20 May 2014 06:48:50 +0000 (16:48 +1000)]
Merge remote-tracking branch 'dma-mapping/dma-mapping-next'

10 years agoMerge remote-tracking branch 'gpio/for-next'
Stephen Rothwell [Tue, 20 May 2014 06:47:19 +0000 (16:47 +1000)]
Merge remote-tracking branch 'gpio/for-next'

Conflicts:
Documentation/driver-model/devres.txt

10 years agoMerge remote-tracking branch 'pinctrl/for-next'
Stephen Rothwell [Tue, 20 May 2014 06:46:01 +0000 (16:46 +1000)]
Merge remote-tracking branch 'pinctrl/for-next'

10 years agoMerge remote-tracking branch 'target-updates/for-next'
Stephen Rothwell [Tue, 20 May 2014 06:45:00 +0000 (16:45 +1000)]
Merge remote-tracking branch 'target-updates/for-next'

10 years agoMerge remote-tracking branch 'scsi/for-next'
Stephen Rothwell [Tue, 20 May 2014 06:44:57 +0000 (16:44 +1000)]
Merge remote-tracking branch 'scsi/for-next'

10 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Tue, 20 May 2014 06:38:47 +0000 (16:38 +1000)]
Merge remote-tracking branch 'cgroup/for-next'

10 years agoMerge remote-tracking branch 'char-misc/char-misc-next'
Stephen Rothwell [Tue, 20 May 2014 06:37:47 +0000 (16:37 +1000)]
Merge remote-tracking branch 'char-misc/char-misc-next'

10 years agoMerge remote-tracking branch 'staging/staging-next'
Stephen Rothwell [Tue, 20 May 2014 06:27:48 +0000 (16:27 +1000)]
Merge remote-tracking branch 'staging/staging-next'

Conflicts:
drivers/iio/adc/Kconfig
drivers/staging/rtl8723au/os_dep/usb_ops_linux.c

10 years agoMerge remote-tracking branch 'usb-gadget/next'
Stephen Rothwell [Tue, 20 May 2014 06:26:46 +0000 (16:26 +1000)]
Merge remote-tracking branch 'usb-gadget/next'

Conflicts:
drivers/usb/phy/phy-mv-u3d-usb.c

10 years agoMerge remote-tracking branch 'usb/usb-next'
Stephen Rothwell [Tue, 20 May 2014 06:22:04 +0000 (16:22 +1000)]
Merge remote-tracking branch 'usb/usb-next'

10 years agoMerge remote-tracking branch 'tty/tty-next'
Stephen Rothwell [Tue, 20 May 2014 06:20:20 +0000 (16:20 +1000)]
Merge remote-tracking branch 'tty/tty-next'

Conflicts:
arch/arm64/kernel/early_printk.c

10 years agoMerge remote-tracking branch 'driver-core/driver-core-next'
Stephen Rothwell [Tue, 20 May 2014 06:08:01 +0000 (16:08 +1000)]
Merge remote-tracking branch 'driver-core/driver-core-next'

10 years agoMerge remote-tracking branch 'leds/for-next'
Stephen Rothwell [Tue, 20 May 2014 06:06:54 +0000 (16:06 +1000)]
Merge remote-tracking branch 'leds/for-next'

10 years agoMerge remote-tracking branch 'hsi/for-next'
Stephen Rothwell [Tue, 20 May 2014 06:05:37 +0000 (16:05 +1000)]
Merge remote-tracking branch 'hsi/for-next'

10 years agoMerge remote-tracking branch 'regmap/for-next'
Stephen Rothwell [Tue, 20 May 2014 06:04:14 +0000 (16:04 +1000)]
Merge remote-tracking branch 'regmap/for-next'

10 years agoMerge remote-tracking branch 'drivers-x86/linux-next'
Stephen Rothwell [Tue, 20 May 2014 06:04:06 +0000 (16:04 +1000)]
Merge remote-tracking branch 'drivers-x86/linux-next'

10 years agoMerge remote-tracking branch 'workqueues/for-next'
Stephen Rothwell [Tue, 20 May 2014 05:52:57 +0000 (15:52 +1000)]
Merge remote-tracking branch 'workqueues/for-next'

10 years agoMerge remote-tracking branch 'percpu/for-next'
Stephen Rothwell [Tue, 20 May 2014 05:41:38 +0000 (15:41 +1000)]
Merge remote-tracking branch 'percpu/for-next'

10 years agoMerge remote-tracking branch 'xen-tip/linux-next'
Stephen Rothwell [Tue, 20 May 2014 05:32:41 +0000 (15:32 +1000)]
Merge remote-tracking branch 'xen-tip/linux-next'

10 years agoMerge remote-tracking branch 'kvm-arm/next'
Stephen Rothwell [Tue, 20 May 2014 05:31:31 +0000 (15:31 +1000)]
Merge remote-tracking branch 'kvm-arm/next'

10 years agoMerge remote-tracking branch 'kvm/linux-next'
Stephen Rothwell [Tue, 20 May 2014 05:30:27 +0000 (15:30 +1000)]
Merge remote-tracking branch 'kvm/linux-next'

10 years agoMerge remote-tracking branch 'rcu/rcu/next'
Stephen Rothwell [Tue, 20 May 2014 05:19:13 +0000 (15:19 +1000)]
Merge remote-tracking branch 'rcu/rcu/next'

10 years agoMerge remote-tracking branch 'ftrace/for-next'
Stephen Rothwell [Tue, 20 May 2014 05:16:38 +0000 (15:16 +1000)]
Merge remote-tracking branch 'ftrace/for-next'

10 years agoMerge remote-tracking branch 'irqchip/irqchip/for-next'
Stephen Rothwell [Tue, 20 May 2014 05:15:41 +0000 (15:15 +1000)]
Merge remote-tracking branch 'irqchip/irqchip/for-next'

10 years agoMerge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Tue, 20 May 2014 05:14:38 +0000 (15:14 +1000)]
Merge remote-tracking branch 'edac-amd/for-next'

10 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Tue, 20 May 2014 05:03:13 +0000 (15:03 +1000)]
Merge remote-tracking branch 'tip/auto-latest'

Conflicts:
drivers/block/mtip32xx/mtip32xx.c
kernel/sched/idle.c
net/ipv4/tcp_output.c

10 years agoMerge remote-tracking branch 'spi/for-next'
Stephen Rothwell [Tue, 20 May 2014 05:01:59 +0000 (15:01 +1000)]
Merge remote-tracking branch 'spi/for-next'

10 years agoMerge remote-tracking branch 'dt-rh/for-next'
Stephen Rothwell [Tue, 20 May 2014 05:00:08 +0000 (15:00 +1000)]
Merge remote-tracking branch 'dt-rh/for-next'

10 years agoMerge remote-tracking branch 'audit/master'
Stephen Rothwell [Tue, 20 May 2014 04:58:21 +0000 (14:58 +1000)]
Merge remote-tracking branch 'audit/master'

Conflicts:
arch/mips/include/asm/syscall.h
arch/mips/kernel/ptrace.c
arch/x86/Kconfig
kernel/audit.c