All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pranith Kumar <pranith@gatech.edu>
To: peterz@infradead.org, mingo@kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: regarding use of various cmpxchg* API
Date: Thu, 05 Jun 2014 18:44:37 -0400	[thread overview]
Message-ID: <5390F2D5.909@gatech.edu> (raw)

Hi Peter, Ingo,

I see that in the drivers there are the following types of cmpxchg API:

__cmpxchg64()
atomic_cmpxchg()
atomic64_cmpxchg()
cmpxchg()
atomic_long_cmpxchg()
cmpxchg_local()
local_cmpxchg()(in kernel/events/ring_buffer.c)
this_cpu_cmpxchg()

Since cmpxchg() internally handles the width, do you think it makes sense to replace the above uses of cmpxchg with the document API (cmpxchg, atomic_cmpxchg, cmpxchg_local)?

I am willing to do this and wanted to know if it something you think is worth pursuing.

Regards,
Pranith

             reply	other threads:[~2014-06-05 22:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 22:44 Pranith Kumar [this message]
2014-06-06  7:29 ` regarding use of various cmpxchg* API Peter Zijlstra
2014-06-06 14:17   ` Pranith Kumar
2014-06-06 14:30     ` Peter Zijlstra

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=5390F2D5.909@gatech.edu \
    --to=pranith@gatech.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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.