sched: don't call task_group() many times in set_task_rq()

It improves perfomance, especially if autogroup enabled.

The size of set_task_rq() was 0x180 and now it is 0xa0.

Signed-off-by: Andrew Vagin <avagin@openvz.org>
slub: set slub_max_order to 0

To avoid locking and per-cpu overhead, SLUB optimisically uses
high-order allocations up to order-3 by default and falls back to lower
allocations if they fail.

So, with the default value (slub_max_order = 3), the kernel may ask up
to 3 contigous pages for each slab. However, with a reduced amount of
memory it is not worth to try to do order-3 allocations, it adds more
overhead (shrinkers have to free more objects to release any memory) and
probably it can easily fail to success with order-3 allocations.

For this reason it is better to immediately fallback to oder-0
allocations to reduce unnecessary overhead.

Signed-off-by: Andrea Righi <andrea@betterlinux.com>
Added optimized ARM RWSEM algorithm.
sched/nohz: Fix rq->cpu_load[] calculations

While investigating why the load-balancer did funny I found that the
rq->cpu_load[] tables were completely screwy.. a bit more digging
revealed that the updates that got through were missing ticks followed
by a catchup of 2 ticks.

The catchup assumes the cpu was idle during that time (since only nohz
can cause missed ticks and the machine is idle etc..) this means that
esp. the higher indices were significantly lower than they ought to
be.

The reason for this is that its not correct to compare against jiffies
on every jiffy on any other cpu than the cpu that updates jiffies.

This patch cludges around it by only doing the catch-up stuff from
nohz_idle_balance() and doing the regular stuff unconditionally from
the tick.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: pjt@google.com
Cc: Venkatesh Pallipadi <venki@google.com>
Link: http://lkml.kernel.org/n/tip-tp4kj18xdd5aj4vvj0qg55s2@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
modified for Linux 3.0 from Linux 3.4+ by faux123
Reduced Android Logger RAM usage. TNX to sakindia123@xda for point.

Conflicts:

	drivers/staging/android/logger.c