Re: [PATCH] x86: avoid calling arch_trigger_all_cpu_backtrace() atthe same time on SMP

From: Eric Dumazet
Date: Thu Nov 11 2010 - 04:51:56 EST


Le jeudi 11 novembre 2010 Ã 10:23 +0100, Ingo Molnar a Ãcrit :

> Also, variables that cmpxchg or test_and_set operates on need to be long, not int.

Hmm, ok for test_and_set(), it operates on a long.

cmpxchg() is ok on an int AFAIK. If not we have to make some changes :(

btrfs_orphan_cleanup() for example does this :

if (cmpxchg(&root->orphan_cleanup_state, 0, ORPHAN_CLEANUP_STARTED))
...


Same in build_ehash_secret() (net/ipv4/af_inet.c)

cmpxchg(&inet_ehash_secret, 0, rnd);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/