From: "Jürgen Groß" <jgross@suse.com>
To: Julien Grall <julien@xen.org>,
Igor Druzhinin <igor.druzhinin@citrix.com>,
xen-devel@lists.xenproject.org
Cc: "Kevin Tian" <kevin.tian@intel.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Jan Beulich" <jbeulich@suse.com>, "Wei Liu" <wl@xen.org>,
"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
"George Dunlap" <George.Dunlap@eu.citrix.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Ian Jackson" <ian.jackson@eu.citrix.com>,
"Jun Nakajima" <jun.nakajima@intel.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH v2 0/4] xen/rcu: let rcu work better with core scheduling
Date: Sat, 22 Feb 2020 14:56:30 +0100 [thread overview]
Message-ID: <396b66ef-f6f5-93d6-029b-b8c5aa0090a4@suse.com> (raw)
In-Reply-To: <01202d13-95a5-4491-63a3-ed3195d92974@xen.org>
On 22.02.20 13:32, Julien Grall wrote:
> Hi,
>
> On 22/02/2020 06:05, Jürgen Groß wrote:
>> On 22.02.20 03:29, Igor Druzhinin wrote:
>>> On 18/02/2020 12:21, Juergen Gross wrote:
>>>> Today the RCU handling in Xen is affecting scheduling in several ways.
>>>> It is raising sched softirqs without any real need and it requires
>>>> tasklets for rcu_barrier(), which interacts badly with core scheduling.
>>>>
>>>> This small series repairs those issues.
>>>>
>>>> Additionally some ASSERT()s are added for verification of sane rcu
>>>> handling. In order to avoid those triggering right away the obvious
>>>> violations are fixed.
>>>
>>> I've done more testing of this with [1] and, unfortunately, it quite
>>> easily
>>> deadlocks while without this series it doesn't.
>>>
>>> Steps to repro:
>>> - apply [1]
>>> - take a host with considerable CPU count (~64)
>>> - run a loop: xen-hptool smt-disable; xen-hptool smt-enable
>>>
>>> [1]
>>> https://lists.xenproject.org/archives/html/xen-devel/2020-02/msg01383.html
>>>
>>
>> Yeah, the reason for that is that rcu_barrier() is a nop in this
>> situation without my patch, as the then called stop_machine_run() in
>> rcu_barrier() will just return -EBUSY.
>
> I think rcu_barrier() been a NOP is also problem as it means you would
> be able to continue before the in-flight callback has been completed.
>
> But I am not entirely sure why a deadlock would happen with your
> suggestion? Could you details a bit more?
get_cpu_maps() will return false as long stop_machine_run() is holding
the lock, and rcu handling will loop until it gets the lock...
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2020-02-22 13:57 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 12:21 [Xen-devel] [PATCH v2 0/4] xen/rcu: let rcu work better with core scheduling Juergen Gross
2020-02-18 12:21 ` [Xen-devel] [PATCH v2 1/4] xen/rcu: use rcu softirq for forcing quiescent state Juergen Gross
2020-02-21 14:17 ` Andrew Cooper
2020-02-18 12:21 ` [Xen-devel] [PATCH v2 2/4] xen/rcu: don't use stop_machine_run() for rcu_barrier() Juergen Gross
2020-02-18 12:21 ` [Xen-devel] [PATCH v2 3/4] xen: add process_pending_softirqs_norcu() for keyhandlers Juergen Gross
2020-02-24 11:25 ` Roger Pau Monné
2020-02-24 11:44 ` Jürgen Groß
2020-02-24 12:02 ` Roger Pau Monné
2020-02-18 12:21 ` [Xen-devel] [PATCH v2 4/4] xen/rcu: add assertions to debug build Juergen Gross
2020-02-24 11:31 ` Roger Pau Monné
2020-02-24 11:45 ` Jürgen Groß
2020-02-18 13:15 ` [Xen-devel] [PATCH v2 0/4] xen/rcu: let rcu work better with core scheduling Igor Druzhinin
2020-02-19 16:48 ` Igor Druzhinin
2020-02-22 2:29 ` Igor Druzhinin
2020-02-22 6:05 ` Jürgen Groß
2020-02-22 12:32 ` Julien Grall
2020-02-22 13:56 ` Jürgen Groß [this message]
2020-02-22 16:42 ` Igor Druzhinin
2020-02-23 14:14 ` Jürgen Groß
2020-02-27 15:16 ` Igor Druzhinin
2020-02-27 15:21 ` Jürgen Groß
2020-02-28 7:10 ` Jürgen Groß
2020-03-02 13:25 ` Igor Druzhinin
2020-03-02 14:03 ` Jürgen Groß
2020-03-02 14:23 ` Igor Druzhinin
2020-03-02 14:32 ` Jürgen Groß
2020-03-02 22:29 ` Igor Druzhinin
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=396b66ef-f6f5-93d6-029b-b8c5aa0090a4@suse.com \
--to=jgross@suse.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=igor.druzhinin@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=konrad.wilk@oracle.com \
--cc=roger.pau@citrix.com \
--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.