07 Mar, 2012

1 commit


27 Jul, 2011

4 commits

  • This clarifies the differences between and

    Signed-off-by: Arun Sharma
    Suggested-by: Mike Frysinger
    Cc: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • After changing all consumers of atomics to include , we
    ran into some compile time errors due to this dependency chain:

    linux/atomic.h
    -> asm/atomic.h
    -> asm-generic/atomic-long.h

    where atomic-long.h could use funcs defined later in linux/atomic.h
    without a prototype. This patches moves the code that includes
    asm-generic/atomic*.h to linux/atomic.h.

    Archs that need need to select
    CONFIG_GENERIC_ATOMIC64 from now on (some of them used to include it
    unconditionally).

    Compile tested on i386 and x86_64 with allnoconfig.

    Signed-off-by: Arun Sharma
    Cc: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • This is in preparation for more generic atomic primitives based on
    __atomic_add_unless.

    Signed-off-by: Arun Sharma
    Signed-off-by: Hans-Christian Egtvedt
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

20 Jul, 2011

1 commit


28 May, 2011

1 commit


12 Nov, 2010

1 commit

  • 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.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Eric Dumazet
    Cc: Christoph Lameter
    Cc: Ingo Molnar
    Cc: Andi Kleen
    Cc: Arnaldo Carvalho de Melo
    Cc: David Miller
    Cc: "Paul E. McKenney"
    Cc: Nick Piggin
    Reviewed-by: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet