From: Ingo Molnar <mingo@elte.hu>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Dongdong Deng <dongdong.deng@windriver.com>,
dzickus@redhat.com, peterz@infradead.org, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: avoid calling arch_trigger_all_cpu_backtrace() at the same time on SMP
Date: Thu, 11 Nov 2010 10:57:50 +0100 [thread overview]
Message-ID: <20101111095750.GA24558@elte.hu> (raw)
In-Reply-To: <1289469104.17691.1025.camel@edumazet-laptop>
* Eric Dumazet <eric.dumazet@gmail.com> wrote:
> 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);
You are right - cmpxchg() auto-detects the word size and thus should work on int
too.
Thanks,
Ingo
next prev parent reply other threads:[~2010-11-11 9:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 2:20 [PATCH] x86: avoid calling arch_trigger_all_cpu_backtrace() at the same time on SMP Dongdong Deng
2010-11-11 9:23 ` Ingo Molnar
2010-11-11 9:51 ` DDD
2010-11-11 10:01 ` Ingo Molnar
2010-11-11 11:00 ` DDD
2010-11-11 9:51 ` Eric Dumazet
2010-11-11 9:57 ` Ingo Molnar [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-11-02 18:16 Don Zickus
2010-11-10 7:43 ` Ingo Molnar
2010-11-10 8:35 ` DDD
2010-11-10 8:39 ` Ingo Molnar
2010-10-11 10:31 Dongdong Deng
2010-10-18 11:00 ` DDD
2010-10-18 18:03 ` Don Zickus
2010-10-21 5:17 ` DDD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101111095750.GA24558@elte.hu \
--to=mingo@elte.hu \
--cc=dongdong.deng@windriver.com \
--cc=dzickus@redhat.com \
--cc=eric.dumazet@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.