All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: "Jürgen Groß" <jgross@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Jun Nakajima <jun.nakajima@intel.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>,
	Jan Beulich <jbeulich@suse.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCH v2 3/4] xen: add process_pending_softirqs_norcu() for keyhandlers
Date: Mon, 24 Feb 2020 13:02:14 +0100	[thread overview]
Message-ID: <20200224120214.GN4679@Air-de-Roger> (raw)
In-Reply-To: <b01bd510-58c2-4a05-4e0a-dbf3ab6abd57@suse.com>

On Mon, Feb 24, 2020 at 12:44:48PM +0100, Jürgen Groß wrote:
> On 24.02.20 12:25, Roger Pau Monné wrote:
> > On Tue, Feb 18, 2020 at 01:21:13PM +0100, Juergen Gross wrote:
> > > Some keyhandlers are calling process_pending_softirqs() while holding
> > > a rcu_read_lock(). This is wrong, as process_pending_softirqs() might
> > > activate rcu calls which should not happen inside a rcu_read_lock().
> > 
> > It might be helpful to turn the ASSERT in process_pending_softirqs
> > into ASSERT_NOT_IN_ATOMIC also, as it would catch such missuses
> > AFAICT.
> 
> No, this would be triggering in __cpu_up() at system boot.

Yes, saw that in the next patch.

> > 
> > > 
> > > For that purpose add process_pending_softirqs_norcu() which will not
> > > do any rcu activity and use this for keyhandlers.
> > 
> > I wonder if for keyhandlers it might be easier to just disable the
> > watchdog in handle_keypress and remove the softirq processing from the
> > handlers.
> > 
> > At the end of day we want the keyhanders to run as fast as possible in
> > order to get the data out, and we only care about the watchdog not
> > triggering? (maybe I'm missing something here)
> 
> It is not that simple, I believe.
> 
> You'd need to be very careful that other functionality wouldn't suffer.
> I'm e.g. not sure time_calibration won't lead to a hanging system then.

AFAICT time_calibration is used to sync the timestamps of the various
CPUs so that they don't drift too much, but I don't think not
executing it could lead to a hang, it would lead to (bigger) skews
between CPUs, but such skews happen anyway.

Thanks, Roger.

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

  reply	other threads:[~2020-02-24 12:02 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é [this message]
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ß
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=20200224120214.GN4679@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=konrad.wilk@oracle.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.