atomic: add atomic_inc_not_zero_hint()
atomic: add atomic_inc_not_zero_hint()

Followup of perf tools session in Netfilter WorkShop 2010

In the network stack we make high usage of atomic_inc_not_zero() in
contexts we know the probable value of atomic before increment (2 for udp
sockets for example)

Using a special version of atomic_inc_not_zero() giving this hint can help
processor to use less bus transactions.

On x86 (MESI protocol) for example, this avoids entering Shared state,
because "lock cmpxchg" issues an RFO (Read For Ownership)

akpm: Adds a new include/linux/atomic.h.  This means that new code should
henceforth include linux/atomic.h and not asm/atomic.h.  The presence of
include/linux/atomic.h will in fact cause checkpatch.pl to warn about use
of asm/atomic.h.  The new include/linux/atomic.h becomes the place where
arch-neutral atomic_t code should be placed.

[5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org: coding-style fixes]
Signed-off-by: Eric Dumazet <a0baddf32b28d2f9429941ed4af2fe636e210591@gmail.com>
Cc: Christoph Lameter <ef3ecccf258fa062c5c6521a4887d40541963af7@linux-foundation.org>
Cc: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>
Cc: Andi Kleen <dbd122ef7b6a09ffecf5db9c9296320f3c94e707@firstfloor.org>
Cc: Arnaldo Carvalho de Melo <293abb6b76d7791c0732cc517d38c4b5c734b87f@infradead.org>
Cc: David Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>
Cc: "Paul E. McKenney" <1e0ce936bb9b355d257bf5790d2513c3f28be22b@linux.vnet.ibm.com>
Cc: Nick Piggin <24829078df5003d9dd1dd871ca2aeb0b1cf95ef4@kernel.dk>
Reviewed-by: "Paul E. McKenney" <1e0ce936bb9b355d257bf5790d2513c3f28be22b@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas