android: lowmemorykiller: modify return values to avoid extra calls

If the shrinker returns a large cache size, it will get called
repeatedly, proportional to the cache size divided by 128.  If
no processes to kill were found on the last pass through the
shrinker, there is no reason calling it again immediately will
find a process to kill.

Avoid the extra calls to the shrinker by:
Returning 0 when the shrinker is called with 0 and there are plenty
of free or file pages.  Avoids calling the shrinker at all during
this pass.
Returning rem when a thread is already dying.  Avoids telling the
shrinker core that the lowmemorykiller is making immense amounts
of forward progress.
Returning -1 when no process was selected for death.  Avoids calling
the shrinker again when nothing has changed.

Change-Id: I08f06063084f6070e71ac6afa7b14377149f3685
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Staging: android: binder: Add binder buffers to kmemleak

Some binder_transaction structs are only referenced by a
binder_buffer. This could cause kmemleak to report them as
unreferenced.

Change-Id: I939540faa547afac4284f70f0e08ceb57a7a823d
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
hashtable: introduce a small and naive hashtable

This hashtable implementation is using hlist buckets to provide a simple
hashtable to prevent it from getting reimplemented all over the kernel.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
[ Merging this now, so that subsystems can start applying Sasha's
  patches that use this   - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
block,elevator: use new hashtable implementation

Switch elevator to use the new hashtable implementation. This reduces the
amount of generic unrelated code in the elevator.

This also removes the dymanic allocation of the hash table. The size of the table is
constant so there's no point in paying the price of an extra dereference when accessing
it.

This patch depends on d9b482c ("hashtable: introduce a small and naive
hashtable") which was merged in v3.6.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Linux 3.0.62
Change vfp compiler flags
Revert "lib/string & lib/memcpy: use GNU implementation."

This reverts commit d57ed4b00786c005a09cf66e0be424631e50ae32.
lib: strncpy_from_user && strnlen_user

Change-Id: I60d45f8d25848d32fd7bdbccb424f1862144bdc8
SCHEDULER: Autogroup patch group by current user android UID instead of task ID
sched_features: Disable GENTLE_FAIR_SLEEPERS

Original patch: https://github.com/existz/android_kernel_samsung_tuna/commit/e03425fa749f24cd2c09c8d4185607a35cd22fb4
enable NOATIME and NODIRATIME by default

Original patch: https://github.com/existz/android_kernel_samsung_tuna/commit/e03425fa749f24cd2c09c8d4185607a35cd22fb4
android_alarm.h: Revert "Android alarm: IOCTL command encoding fix"
http://www.omapzoom.org/?p=kernel/omap.git;a=commit;h=ac1150577b9c46bfbebaff7a99f2f09e2596695d
musb_gadget.c: OMAP4: MUSB: peripheral isoch in transfer support


This patch fixes the following

1. The logic that determines a short packet endpoint sizes to be a power of

   2 number. This is typically not true for isochronous endpoints.

2. When a short/zero packet or DMA mode 0 is used, and TXPKTRDY is needed to

   be set by the CPU, the ISO bit should be set if its an isochronous transfer.

3. When a short/zero packet or DMA mode 0 is used, and TXPKTRDY is set by the

   CPU, g_giveback_request is deferred till the endpoint interrupt occurs.
http://www.omapzoom.org/?p=kernel/omap.git;a=commit;h=519bdcb4401cae8ba453c251cc3eba6d419917e7
defconfig: Linux/arm 3.0.62 Kernel Configuration