Merge remote-tracking branch 'upstream/master-jelly-cm-aokp' into master-jelly-cm-aokp
Merge branch 'master-jelly-cm-aokp' of github.com:Alucard24/Dorimanx-SG2-I9100-Kernel into master-jelly-cm-aokp
Corrected getting number of cores into build kernel function!
Fixed now:)
Merge remote-tracking branch 'upstream/master-jelly-cm-aokp' into master-jelly-cm-aokp
Nightmare governor: Optimized code!
Merge branch 'master-jelly-cm-aokp' of github.com:Alucard24/Dorimanx-SG2-I9100-Kernel into master-jelly-cm-aokp

Conflicts:
	build_kernel.sh
	drivers/cpufreq/cpufreq_nightmare.c
Merge remote-tracking branch 'upstream/master-jelly-cm-aokp' into master-jelly-cm-aokp
Nightmare governor: little adjustment and removed a parameter!
Merge remote-tracking branch 'upstream/master-jelly-cm-aokp' into master-jelly-cm-aokp

Conflicts:
	drivers/cpufreq/cpufreq_nightmare.c
Merge remote-tracking branch 'upstream/master-jelly-cm-aokp' into master-jelly-cm-aokp
Different file between me and Yuri release!
Nightmare governor: removed useless line of code!
Merge remote-tracking branch 'upstream/master-jelly-cm-aokp' into master-jelly-cm-aokp
Merge remote-tracking branch 'upstream/master-jelly-cm-aokp' into master-jelly-cm-aokp
Merge remote-tracking branch 'upstream/master-jelly-cm-aokp' into master-jelly-cm-aokp
Merge remote-tracking branch 'upstream/master-jelly-cm-aokp' into master-jelly-cm-aokp
Nightmare governor: Added a new parameter!
MEM,LOGGER,BINDER, and Friends, update from Google Android 3.10.RC5!

This is mostly revert from commit that i made sync
from Google Android 3.9.RC7

and some more corrections :)
mm: distinguish between mlocked and pinned pages

Some kernel components pin user space memory (infiniband and perf) (by
increasing the page count) and account that memory as "mlocked".

The difference between mlocking and pinning is:

A. mlocked pages are marked with PG_mlocked and are exempt from
   swapping. Page migration may move them around though.
   They are kept on a special LRU list.

B. Pinned pages cannot be moved because something needs to
   directly access physical memory. They may not be on any
   LRU list.

I recently saw an mlockalled process where mm->locked_vm became
bigger than the virtual size of the process (!) because some
memory was accounted for twice:

Once when the page was mlocked and once when the Infiniband
layer increased the refcount because it needt to pin the RDMA
memory.

This patch introduces a separate counter for pinned pages and
accounts them seperately.

Signed-off-by: Christoph Lameter <cl@linux.com>
Cc: Mike Marciniszyn <infinipath@qlogic.com>
Cc: Roland Dreier <roland@kernel.org>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>