All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: "Jürgen Groß" <jgross@suse.com>, xen-devel@lists.xenproject.org
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Dario Faggioli <dfaggioli@suse.com>
Subject: Re: [Xen-devel] [PATCH] xen/sched: fix locking in sched_tick_[suspend|resume]()
Date: Fri, 4 Oct 2019 15:34:01 +0100	[thread overview]
Message-ID: <2965839e-6be2-720f-ad1a-8e725f0bffaa@citrix.com> (raw)
In-Reply-To: <e8364443-4f7f-62b7-f00d-4687ae07628b@suse.com>

On 10/4/19 3:24 PM, Jürgen Groß wrote:
> On 04.10.19 16:08, George Dunlap wrote:
>> On 10/4/19 7:40 AM, Juergen Gross wrote:
>>> sched_tick_suspend() and sched_tick_resume() should not call the
>>> scheduler specific timer handlers in case the cpu they are running on
>>> is just being moved to or from a cpupool.
>>>
>>> Use a new percpu lock for that purpose.
>>
>> Is there a reason we can't use the pcpu_schedule_lock() instead of
>> introducing a new one?  Sorry if this is obvious, but it's been a while
>> since I poked around this code.
> 
> Lock contention would be higher especially with credit2 which is using a
> per-core or even per-socket lock. We don't care about other scheduling
> activity here, all we need is a guard against our per-cpu scheduler
> data being changed beneath our feet.

Is this code really being called so often that we need to worry about
this level of contention?

We already have a *lot* of locks; and in this case you're adding a
second lock which interacts with the per-scheduler cpu lock.  This just
seems like asking for trouble.

I won't Nack the patch, but I don't think I would ack it without clear
evidence that the extra lock has a performance improvement that's worth
the cost of the extra complexity.

 -George

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

  reply	other threads:[~2019-10-04 14:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04  6:40 [Xen-devel] [PATCH] xen/sched: fix locking in sched_tick_[suspend|resume]() Juergen Gross
2019-10-04  7:50 ` Andrew Cooper
2019-10-04 14:29   ` Dario Faggioli
2019-10-04 14:49     ` Andrew Cooper
2019-10-04 14:08 ` George Dunlap
2019-10-04 14:24   ` Jürgen Groß
2019-10-04 14:34     ` George Dunlap [this message]
2019-10-04 14:43       ` Jürgen Groß
2019-10-04 14:56         ` George Dunlap
2019-10-04 15:03           ` Jürgen Groß
2019-10-04 15:37             ` George Dunlap
2019-10-04 15:40               ` Jürgen Groß
2019-10-04 16:09                 ` George Dunlap
2019-10-06 18:05                   ` Jürgen Groß
2019-10-07  6:09                     ` Jürgen Groß
2019-10-07  8:49                     ` Dario Faggioli

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=2965839e-6be2-720f-ad1a-8e725f0bffaa@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=dfaggioli@suse.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jgross@suse.com \
    --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.