From: Dario Faggioli <dfaggioli@suse.com>
To: "Jürgen Groß" <jgross@suse.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>
Subject: Re: [Xen-devel] [PATCH] xen/sched: rework credit2 run-queue allocation
Date: Thu, 20 Feb 2020 10:28:48 +0100 [thread overview]
Message-ID: <19decaf1ecf3e3b2aaaa0896a586b178ef65fbe4.camel@suse.com> (raw)
In-Reply-To: <40a41da6-64a0-d332-c544-0eb937204fa6@suse.com>
[-- Attachment #1.1: Type: text/plain, Size: 1864 bytes --]
On Thu, 2020-02-20 at 07:56 +0100, Jürgen Groß wrote:
> On 19.02.20 19:37, Dario Faggioli wrote:
> > On Wed, 2020-02-19 at 17:52 +0100, Jan Beulich wrote:
> > >
> > Nevertheless, I'd add a quick comment about that, to make it even
> > more
> > obvious. :-)
>
> Do we really need that?
>
> Calling any of the alloc functions with interrupts off will crash the
> system (at least in debug builds).
>
> I don't think we want to add such comments all over the code.
>
No, and that is not what I am suggesting we do. :-)
Neither I want to push to hard (or slow the patch down) just for this.
But, yes, I feel that considering how the code looks, in this
particular case, it is not entirely obvious to immediately realize that
that is the actual reason. Even more so, if we consider that it is not
such a common issue in scheduling code, where there is an (as much as
possible) clear split between allocation and init / usage phases (all
the *_alloc_*data() stuff).
Having just a one liner here would, I think, save people reading this
code some brain power, which they'll be able to use for focusing on
more scheduler specific issues.
Something like:
/* In case we need it, allocate a new runq now, before taking the lock. */
Anyway, as said, I don't want to push too hard on this. If you feel
strongly about not having something like that, I won't block the patch.
If I then decide that I really want such a comment, I will submit a
patch myself, and maybe we'll discuss the pros & cons of having it in
that thread. :-)
Thanks and Regards
--
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
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-20 9:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 8:55 [Xen-devel] [PATCH] xen/sched: rework credit2 run-queue allocation Juergen Gross
2020-02-06 12:04 ` Jürgen Groß
2020-02-19 16:47 ` Dario Faggioli
2020-02-19 16:52 ` Jan Beulich
2020-02-19 18:37 ` Dario Faggioli
2020-02-20 6:56 ` Jürgen Groß
2020-02-20 9:28 ` Dario Faggioli [this message]
2020-02-20 6:54 ` Jürgen Groß
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=19decaf1ecf3e3b2aaaa0896a586b178ef65fbe4.camel@suse.com \
--to=dfaggioli@suse.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jbeulich@suse.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.