Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1180558
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC tip/core/rcu 05/14] rcu: Abstract sequence counting from synchronize_sched_expedited() |
| Date | 2015-07-09 10:50 +0200 |
| Message-ID | <pKfGP-6mA-19@gated-at.bofh.it> (permalink) |
| References | <pHccp-6VE-3@gated-at.bofh.it> <pHccp-6VE-5@gated-at.bofh.it> <pHccr-6VE-47@gated-at.bofh.it> <pHnrc-3XE-3@gated-at.bofh.it> <pHywi-2Fq-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jul 01, 2015 at 03:18:04PM -0700, Paul E. McKenney wrote:
> > > +/* Adjust sequence number for start of update-side operation. */
> > > +static void rcu_seq_start(unsigned long *sp)
> > > +{
> > > + WRITE_ONCE(*sp, *sp + 1);
> > > + smp_mb(); /* Ensure update-side operation after counter increment. */
> > > + WARN_ON_ONCE(!(*sp & 0x1));
> > > +}
> >
> > That wants to be an ACQUIRE, right?
>
> I cannot put the acquire in the WARN_ON_ONCE() because there
> are configurations where WARN_ON_ONCE() is compiled out.
I think WARN_ON_ONCE() always evaulates the condition. You are maybe
thinking of VM_WARN_ON_ONCE().
I'm on a different thread where we almost introduced a bug by using
VM_WARN_ONCE() instead of WARN_ONCE(). The VM_WARNING conditions had
long execute times so they are weird.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH RFC tip/core/rcu 05/14] rcu: Abstract sequence counting from synchronize_sched_expedited() Dan Carpenter <dan.carpenter@oracle.com> - 2015-07-09 10:50 +0200
csiph-web