fs/proc/base.c (affects lowmemorykiller): oom_adj -17 triggers oom_score_adj of -1000

Prior to this patch, oom_score_adj was automatically calculated based
on the oom_adj value.
When setting an oom_adj value of the minium value (-17), automatically
set oom_score_adj to its minimum value (-1000) as well.
mm/oom_kill.c (affects lowmemorykiller): prevent changing oom_score_adj if its value is -1000

This should prevent that the Android OS automatically changes
its value if oom_adj -17 or oom_score_adj -1000 were explicitly
set by the user. To gain control over the variable again,
oom_adj has to be set to anything higher than -17.

Also: compare p->signal->oom_score_adj with OOM_SCORE_ADJ_MIN instead
of static value.

Conflicts:
	mm/oom_kill.c
fs/dache.c / mm/page-writeback.c: allow modification of dirty_-values and cache_pressure despite the dynamic suspend/resume values

Conflicts:
	mm/page-writeback.c

Conflicts:
	mm/page-writeback.c
mm/oom_kill.c (affects lowmemorykiller): prevent changing oom_adj if its value is -17

This should prevent that the Android OS automatically changes
its value when a process has been explicitly set to be unkillable.

To gain control over either oom_adj or oom_score_adj again, set
oom_score_adj to 1000 (OOM_SCORE_MAX).
blkdev.h: default nr_requests to 256
ARM: 7626/1: arm/crypto: Make asm SHA-1 and AES code Thumb-2 compatible

This patch fixes aes-armv4.S and sha1-armv4-large.S to work
natively in Thumb.  This allows ARM/Thumb interworking workarounds
to be removed.

I also take the opportunity to convert some explicit assembler
directives for exported functions to the standard
ENTRY()/ENDPROC().

For the code itself:

  * In sha1_block_data_order, use of TEQ with sp is deprecated in
    ARMv7 and not supported in Thumb.  For the branches back to
    .L_00_15 and .L_40_59, the TEQ is converted to a CMP, under the
    assumption that clobbering the C flag here will not cause
    incorrect behaviour.

    For the first branch back to .L_20_39_or_60_79 the C flag is
    important, so sp is moved temporarily into another register so
    that TEQ can be used for the comparison.

  * In the AES code, most forms of register-indexed addressing with
    shifts and rotates are not permitted for loads and stores in
    Thumb, so the address calculation is done using a separate
    instruction for the Thumb case.

The resulting code is unlikely to be optimally scheduled, but it
should not have a large impact given the overall size of the code.
I haven't run any benchmarks.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Tested-by: David McCullough <ucdevel@gmail.com> (ARM only)
Acked-by: David McCullough <ucdevel@gmail.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: 7723/1: crypto: sha1-armv4-large.S: fix SP handling

Make the SHA1 asm code ABI conformant by making sure all stack
accesses occur above the stack pointer.

Origin:
http://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=1a9d60d2

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arm: unwind: Remove logspam while in debug mode
aio: allocate kiocbs in batches

In testing aio on a fast storage device, I found that the context lock
takes up a fair amount of cpu time in the I/O submission path.  The reason
is that we take it for every I/O submitted (see __aio_get_req).  Since we
know how many I/Os are passed to io_submit, we can preallocate the kiocbs
in batches, reducing the number of times we take and release the lock.

In my testing, I was able to reduce the amount of time spent in
_raw_spin_lock_irq by .56% (average of 3 runs).  The command I used to
test this was:

   aio-stress -O -o 2 -o 3 -r 8 -d 128 -b 32 -i 32 -s 16384 <dev>

I also tested the patch with various numbers of events passed to
io_submit, and I ran the xfstests aio group of tests to ensure I didn't
break anything.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Daniel Ehrenberg <dehrenberg@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Blechd0se <alex.christ@hotmail.de>