NOATIME and NODIRATIME by default
sched.h: set tweaked LOAD AVG moire values
sched: define and use CPU_PRI_* enums for cpu notifier priorities

Instead of hardcoding priority 10 and 20 in sched and perf, collect
them into CPU_PRI_* enums.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
sched: adjust when cpu_active and cpuset configurations are updated during cpu on/offlining

Currently, when a cpu goes down, cpu_active is cleared before
CPU_DOWN_PREPARE starts and cpuset configuration is updated from a
default priority cpu notifier.  When a cpu is coming up, it's set
before CPU_ONLINE but cpuset configuration again is updated from the
same cpu notifier.

For cpu notifiers, this presents an inconsistent state.  Threads which
a CPU_DOWN_PREPARE notifier expects to be bound to the CPU can be
migrated to other cpus because the cpu is no more inactive.

Fix it by updating cpu_active in the highest priority cpu notifier and
cpuset configuration in the second highest when a cpu is coming up.
Down path is updated similarly.  This guarantees that all other cpu
notifiers see consistent cpu_active and cpuset configuration.

cpuset_track_online_cpus() notifier is converted to
cpuset_update_active_cpus() which just updates the configuration and
now called from cpuset_cpu_[in]active() notifiers registered from
sched_init_smp().  If cpuset is disabled, cpuset_update_active_cpus()
degenerates into partition_sched_domains() making separate notifier
for !CONFIG_CPUSETS unnecessary.

This problem is triggered by cmwq.  During CPU_DOWN_PREPARE, hotplug
callback creates a kthread and kthread_bind()s it to the target cpu,
and the thread is expected to run on that cpu.

* Ingo's test discovered __cpuinit/exit markups were incorrect.
  Fixed.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Menage <menage@google.com>
driver core: prune docs about device_interface

drivers/base/intf.c was removed before the beginning of (git) time but
its Documentation stuck around.  Remove it.

Signed-off-by: Brandon Philips <brandon@ifup.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
workqueue: perform cpu down operations from low priority cpu_notifier()

commit 6575820221f7a4dd6eadecf7bf83cdd154335eda upstream.

Currently, all workqueue cpu hotplug operations run off
CPU_PRI_WORKQUEUE which is higher than normal notifiers.  This is to
ensure that workqueue is up and running while bringing up a CPU before
other notifiers try to use workqueue on the CPU.

Per-cpu workqueues are supposed to remain working and bound to the CPU
for normal CPU_DOWN_PREPARE notifiers.  This holds mostly true even
with workqueue offlining running with higher priority because
workqueue CPU_DOWN_PREPARE only creates a bound trustee thread which
runs the per-cpu workqueue without concurrency management without
explicitly detaching the existing workers.

However, if the trustee needs to create new workers, it creates
unbound workers which may wander off to other CPUs while
CPU_DOWN_PREPARE notifiers are in progress.  Furthermore, if the CPU
down is cancelled, the per-CPU workqueue may end up with workers which
aren't bound to the CPU.

While reliably reproducible with a convoluted artificial test-case
involving scheduling and flushing CPU burning work items from CPU down
notifiers, this isn't very likely to happen in the wild, and, even
when it happens, the effects are likely to be hidden by the following
successful CPU down.

Fix it by using different priorities for up and down notifiers - high
priority for up operations and low priority for down operations.

Workqueue cpu hotplug operations will soon go through further cleanup.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	include/linux/cpu.h
CRC32 library patched up
Update mutex.c to upstream 3.0 code
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
Erase memory pages as soon as they are freed to prevent new processes getting old information (franciscofranco)
ashmem: fix deadlock when system is low on memory

When system is low on memory, allocating memory while holding the
        ashmem_mutex may try to directly reclaim memory. Then ashmem_shrink()
        is called in same thread. It will deadlock at acquiring ashmem_mutex.
        This change lets ashmem_shrink() return failure if ashmem_mutex is not
        available. Memory will be reclaimed from others.

        Change-Id: I3b6024d5477d37245f4ebde6d7069fb77af789ee
        Signed-off-by: Yuanyuan Zhong <yuanyuan.zhong@gmail.com>
mm: provide init_mm mm_context initializer

Provide an INIT_MM_CONTEXT intializer macro which can be used to
statically initialize mm_struct:mm_context of init_mm.  This way we can
get rid of code which will do the initialization at run time (on s390).

In addition the current code can be found at a place where it is not
expected.  So let's have a common initializer which architectures
can use if needed.

This is based on a patch from Suzuki Poulose.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Suzuki Poulose <suzuki@in.ibm.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
(cherry picked from commit 45a5e38be9d6a714813aeca82d081b43ec55184a)

Change-Id: Id7819b4bd31b3780677653395c9f4a605b4209bb
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>
net: Introduce u64_stats_sync infrastructure

To properly implement 64bits network statistics on 32bit or 64bit hosts,
we provide one new type and four methods, to ease conversions.

Stats producer should use following template granted it already got an
exclusive access to counters (include/linux/u64_stats_sync.h contains
some documentation about details)

    u64_stats_update_begin(&stats->syncp);
    stats->bytes64 += len;
    stats->packets64++;
    u64_stats_update_end(&stats->syncp);

While a consumer should use following template to get consistent
snapshot :

    u64 tbytes, tpackets;
    unsigned int start;

    do {
        start = u64_stats_fetch_begin(&stats->syncp);
        tbytes = stats->bytes64;
        tpackets = stats->packets64;
    } while (u64_stats_fetch_retry(&stats->lock, syncp));

Suggested by David Miller, and comments courtesy of Nick Piggin.

(cherry picked from commit dbb6777afc9e1ae3037c68c494ae709b48b01295)

Change-Id: I8ba2977f2327470bbbdc9bfa51b5a606f9e61134
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
net: u64_stats_sync improvements

- Add a comment about interrupts:

6) If counter might be written by an interrupt, readers should block
interrupts.

- Fix a typo in sample of use.

(cherry picked from commit f842d69ef113da9977159a80ed60397b21384860)

Change-Id: If50ebe6635ec3ddc8caefdebba05b228a54c18d0
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
net: u64_stats_fetch_begin_bh() and u64_stats_fetch_retry_bh()

- Must disable preemption in case of 32bit UP in u64_stats_fetch_begin()
and u64_stats_fetch_retry()

- Add new u64_stats_fetch_begin_bh() and u64_stats_fetch_retry_bh() for
network usage, disabling BH on 32bit UP only.

(cherry picked from commit f2367f158f6d9d5c5a85dfe087305e9fe1d5ecd4)

Change-Id: If045365139198420212bc08eb28dc1f858d93a1c
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Updates
- Add and enable frontswap (@lupohirp)
- Backport Memory Manager (mm) from Code Aurora Forum kernel, ics_chocolate branch (@androidmeda)

Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	.config
	arch/arm/mach-msm/lge/board-thunderg.c
	fs/ext3/super.c
	fs/ext4/super.c
	fs/proc/base.c
	include/linux/cleancache.h
	include/linux/fs.h
	include/linux/mm.h
	include/linux/percpu_counter.h
	mm/Kconfig
	mm/cleancache.c
Little performance improvement for slub memory allocator @franciscofranco
Update network interface
Part 1
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	.config
	include/linux/netdevice.h
	include/linux/netfilter_ipv4/ipt_ECN.h
	include/linux/netfilter_ipv4/ipt_TTL.h
	include/linux/netfilter_ipv6/ip6t_HL.h
	include/net/cfg80211.h
	include/net/netfilter/nf_conntrack.h
	include/net/regulatory.h
	include/net/sfb.h
	net/ipv4/tcp_output.c
	net/netfilter/nf_conntrack_core.c
	net/netfilter/xt_DSCP.c
Update network interface
Part 2
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	net/netfilter/xt_conntrack.c
net: Data usage now working
(thanks @adfad666, @lupohirp, @anroidmeda)

Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	.config
	arch/arm/configs/cyanogenmod_thunderg_defconfig
	include/linux/cpufreq.h
	net/appletalk/Makefile
	net/appletalk/aarp.c
	net/appletalk/atalk_proc.c
	net/appletalk/ddp.c
	net/appletalk/dev.c
	net/appletalk/sysctl_net_atalk.c
	net/ieee802154/Kconfig
	net/ieee802154/Makefile
	net/ieee802154/af802154.h
	net/ieee802154/af_ieee802154.c
	net/ieee802154/dgram.c
	net/ieee802154/ieee802154.h
	net/ieee802154/netlink.c
	net/ieee802154/nl-mac.c
	net/ieee802154/nl-phy.c
	net/ieee802154/nl_policy.c
	net/ieee802154/raw.c
	net/ieee802154/wpan-class.c
	net/netfilter/xt_TPROXY.c
	net/netfilter/xt_rateest.c
	net/netfilter/xt_socket.c
	net/netfilter/xt_tcpmss.c
	net/wireless/nl80211.c
Revert "Updates"

This reverts commit 8bb441fc87ef08e740cfe6701a4be76ca640cfa9.