public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: dhowells@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: Confused by smp_read_barrier_depends() in rxrpc_rotate_tx_window()
Date: Fri, 30 May 2008 05:45:54 -0700	[thread overview]
Message-ID: <20080530124554.GA14312@linux.vnet.ibm.com> (raw)

Hello, Dave!

I confess to being confused by the smp_read_barrier_depends() in
rxrpc_rotate_tx_window().  It looks like it is ordering the prior
fetch of tail from call->acks_tail with the subsequent use of
tail as an index into the call->acks_window[] array, but then the
code does an assignment to call->acks_tail a few lines later.

If we hold a lock protecting call->acks_tail, why do we need the
smp_read_barrier_depends()?  If we don't hold such a lock, why
is the assignment to call->acks_tail safe?

Help?

						Thanx, Paul

             reply	other threads:[~2008-05-30 12:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 12:45 Paul E. McKenney [this message]
2008-06-03 10:19 ` Confused by smp_read_barrier_depends() in rxrpc_rotate_tx_window() David Howells

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=20080530124554.GA14312@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox