All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Julien Grall <julien@xen.org>, xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [Xen-devel] [PATCH v3 5/6] xen/rcu: add assertions to debug build
Date: Fri, 6 Mar 2020 15:35:51 +0100	[thread overview]
Message-ID: <0e284f2e-0da6-9dc6-9b1e-d6966a8a36e8@suse.com> (raw)
In-Reply-To: <de613cc1-d444-7290-d96b-0d3193fce276@xen.org>

On 04.03.20 14:42, Julien Grall wrote:
> Hi,
> 
> On 04/03/2020 06:32, Juergen Gross wrote:
>> diff --git a/xen/include/xen/rcupdate.h b/xen/include/xen/rcupdate.h
>> index 31c8b86d13..9f6d420898 100644
>> --- a/xen/include/xen/rcupdate.h
>> +++ b/xen/include/xen/rcupdate.h
>> @@ -34,10 +34,40 @@
>>   #include <xen/cache.h>
>>   #include <xen/spinlock.h>
>>   #include <xen/cpumask.h>
>> -#include <xen/preempt.h>
>> +#include <xen/percpu.h>
>> +#include <asm/atomic.h>
>>   #define __rcu
>> +#ifndef NDEBUG
>> +DECLARE_PER_CPU(unsigned int, rcu_lock_cnt);
>> +
>> +static inline void rcu_quiesce_disable(void)
>> +{
>> +    this_cpu(rcu_lock_cnt)++;
>> +    arch_lock_acquire_barrier();
> 
> I am not sure to understand the goal of this barrier. What are you 
> trying to protect against?

This is the result of a request by Roger, which seemed reasonable,
although I should have checked the suggested barrier type more
thoroughly.

He suggested to add barriers like in the former preempt_[en|dis]able()
cases, but to use the acquire and release barriers like in locks.

Thinking more about it I think a simple barrier() should do the trick as
only cpu local protection is needed.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2020-03-06 14:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04  6:32 [Xen-devel] [PATCH v3 0/6] xen/rcu: let rcu work better with core scheduling Juergen Gross
2020-03-04  6:32 ` [Xen-devel] [PATCH v3 1/6] xen/rcu: use rcu softirq for forcing quiescent state Juergen Gross
2020-03-04  6:32 ` [Xen-devel] [PATCH v3 2/6] xen/rcu: don't use stop_machine_run() for rcu_barrier() Juergen Gross
2020-03-04  6:32 ` [Xen-devel] [PATCH v3 3/6] xen: add process_pending_softirqs_norcu() for keyhandlers Juergen Gross
2020-03-04  6:32 ` [Xen-devel] [PATCH v3 4/6] xen/rcu: fix rcu_lock_domain() Juergen Gross
2020-03-04  6:32 ` [Xen-devel] [PATCH v3 5/6] xen/rcu: add assertions to debug build Juergen Gross
2020-03-04 13:42   ` Julien Grall
2020-03-06 14:35     ` Jürgen Groß [this message]
2020-03-06 16:08       ` Julien Grall
2020-03-04  6:32 ` [Xen-devel] [PATCH v3 6/6] xen/rcu: add per-lock counter in debug builds Juergen Gross

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=0e284f2e-0da6-9dc6-9b1e-d6966a8a36e8@suse.com \
    --to=jgross@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.