All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Stefano Stabellini <stefano@aporeto.com>,
	Julien Grall <julien.grall@arm.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 3/3] tools: sched: add support for 'null' scheduler
Date: Fri, 7 Apr 2017 10:42:12 +0100	[thread overview]
Message-ID: <20170407094212.obuxuv3dejrhb7vi@citrix.com> (raw)
In-Reply-To: <1491491913.18721.22.camel@citrix.com>

On Thu, Apr 06, 2017 at 05:18:33PM +0200, Dario Faggioli wrote:
> On Thu, 2017-04-06 at 14:59 +0100, George Dunlap wrote:
> > On 06/04/17 11:49, Dario Faggioli wrote:
> > > 
> > > If that fails (I've tried that), domain creation fails too. So
> > > either
> > > it returns success, or we'd have to modify (at least)
> > > liblx__build_post(), teaching it about acceptable failures.
> > > 
> > > OTOH, we indeed could return success for domain_get() too, for the
> > > sake
> > > of having the two above functions return the same. But I really
> > > think
> > > that call should fail, as an indication to the callers that they
> > > won't
> > > get the value of any parameter for this scheduler.
> > 
> > I see.  So if *our* code doesn't know that there aren't any
> > parameters
> > to set, that's OK; but if *other people's code doesn't know that
> > there
> > aren't any parameters to get, it needs to be changed to know
> > that.  Got
> > it. ;-)
> > 
> Of course! I mean, there must be some advantages and benefits in being
> *us*! :-D
> 
> Actually, jokes apart, this is indeed asymmetric, but looks fair to me.
> As in, _any_ caller (either xl/libxl or external) will see
> libxl_domain_sched_params_set() succeeding, as well as _any_ caller
> (either xl/libxl or external) will see libxl_domain_sched_params_get()
> failing. :-)
> 
> > There is a sort of mathematical logic to the idea that setting a null
> > set of parameters should always succeed; and it's certainly
> > convenient
> > for tools to be able to always just call
> > libxl_domain_sched_params_set()
> > without having to check what scheduler is there.  But the same logic
> > I
> > think applies to get(), so I would say to return 0 for both.
> > 
> I understand your point, and I'm happy to do that.
> 
> > But Wei and Ian have the final say.
> > 
> Wei acked this patch in v1 (20170321170902.ndk6h5ylyfkk4coo@citrix.com)
> but that was before you raised this, so I'm happy to resend with this
> changed, and doing whatever he prefers with his ack.
> 
> Wei?

I don't feel strongly about this. But if you want to return success in
the get function, please make sure you initialise output to a known
state, instead of returning random garbage.

Wei.

> 
> Regards,
> Dario
> -- 
> <<This happens because I choose it to happen!>> (Raistlin Majere)
> -----------------------------------------------------------------
> Dario Faggioli, Ph.D, http://about.me/dario.faggioli
> Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)



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

  reply	other threads:[~2017-04-07  9:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-17 18:42 [PATCH 0/3] The 'null' Scheduler Dario Faggioli
2017-03-17 18:42 ` [PATCH 1/3] xen: sched: introduce the 'null' semi-static scheduler Dario Faggioli
2017-03-20 23:21   ` Stefano Stabellini
2017-03-21  8:26     ` Dario Faggioli
2017-03-27 10:31   ` George Dunlap
2017-03-27 10:48     ` George Dunlap
2017-04-06 14:43       ` Dario Faggioli
2017-04-06 15:07     ` Dario Faggioli
2017-03-17 18:43 ` [PATCH 2/3] xen: sched_null: support for hard affinity Dario Faggioli
2017-03-20 23:46   ` Stefano Stabellini
2017-03-21  8:47     ` Dario Faggioli
2017-03-17 18:43 ` [PATCH 3/3] tools: sched: add support for 'null' scheduler Dario Faggioli
2017-03-20 22:28   ` Stefano Stabellini
2017-03-21 17:09   ` Wei Liu
2017-03-27 10:50   ` George Dunlap
2017-04-06 10:49     ` Dario Faggioli
2017-04-06 13:59       ` George Dunlap
2017-04-06 15:18         ` Dario Faggioli
2017-04-07  9:42           ` Wei Liu [this message]
2017-04-07 10:05             ` Dario Faggioli
2017-04-07 10:13               ` Wei Liu
2017-03-20 22:23 ` [PATCH 0/3] The 'null' Scheduler Stefano Stabellini

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=20170407094212.obuxuv3dejrhb7vi@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=julien.grall@arm.com \
    --cc=stefano@aporeto.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.