xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Creekmore <jonathan.creekmore@gmail.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Jonathan Creekmore <jonathan.creekmore@gmail.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v4 2/5] build: Hook the schedulers into Kconfig
Date: Mon, 11 Jan 2016 09:10:33 -0600	[thread overview]
Message-ID: <m237u440eu.fsf@Nebula.lan> (raw)
In-Reply-To: <5693C52602000078000C56EF@prv-mh.provo.novell.com>


Jan Beulich writes:

>>>> On 08.01.16 at 22:22, <jonathan.creekmore@gmail.com> wrote:
>> --- a/xen/common/Kconfig
>> +++ b/xen/common/Kconfig
>> @@ -51,4 +51,71 @@ config KEXEC
>>
>>  	  If unsure, say Y.
>>
>> +# Enable schedulers
>> +menu "Schedulers"
>> +	visible if EXPERT = "y"
>
> Does "visible if EXPERT" not suffice here?

No, because EXPERT is a string and not a boolean. It has to be a string
since it is pulling in a string from the environment to set its value.

>
>> +config SCHED_CREDIT
>> +	bool "Credit scheduler support"
>> +	default y
>
> I continue to think that not making the primary scheduler configurable
> would be the better solution to the problems resulting from possibly
> all of them getting turned off.

Except that is completely contrary to my goal with this patchset (being
able to compile in just the scheduler that I want to use). Yes, at the
moment, credit is the only non-experimental scheduler and will likely be
the one we choose. However, in the future, when credit2 and possibly
others are non-experimental, we may choose one of the other schedulers
and do not want to carry along credit in our build just because it is
the primary scheduler.

>
>> +config SCHED_CREDIT2
>> +	bool "Credit2 scheduler support (EXPERIMENTAL)"
>> +	default y
>> +	---help---
>> +	  The credit2 scheduler is a general purpose scheduler that is
>> +	  optimized for lower latency and higher VM density.
>> +
>> +	  If unsure, say Y.
>> +
>> +config SCHED_RTDS
>> +	bool "RTDS scheduler support (EXPERIMENTAL)"
>> +	default y
>> +	---help---
>> +	  The RTDS scheduler is a soft and firm real-time scheduler for
>> +	  multicore, targeted for embedded, automotive, graphics and gaming
>> +	  in the cloud, and general low-latency workloads.
>> +
>> +	  If unsure, say N.
>> +
>> +config SCHED_ARINC653
>> +	bool "ARINC653 scheduler support (EXPERIMENTAL)"
>> +	default y
>> +	---help---
>> +	  The ARINC653 scheduler is a hard real-time scheduler for single
>> +	  cores, targeted for avionics, drones, and medical devices.
>> +
>> +	  If unsure, say N.
>> +
>> +choice
>> +	prompt "Default Scheduler?"
>> +	default SCHED_CREDIT_DEFAULT if SCHED_CREDIT
>> +	default SCHED_CREDIT2_DEFAULT if SCHED_CREDIT2
>> +	default SCHED_RTDS_DEFAULT if SCHED_RTDS
>> +	default SCHED_ARINC653_DEFAULT if SCHED_ARINC653
>> +
>> +	config SCHED_CREDIT_DEFAULT
>> +		bool "Credit Scheduler" if SCHED_CREDIT
>> +	config SCHED_CREDIT2_DEFAULT
>> +		bool "Credit2 Scheduler" if SCHED_CREDIT2
>> +	config SCHED_RTDS_DEFAULT
>> +		bool "RT Scheduler" if SCHED_RTDS
>> +	config SCHED_ARINC653_DEFAULT
>> +		bool "ARINC653 Scheduler" if SCHED_ARINC653
>> +endchoice
>> +
>> +config SCHED_DEFAULT
>> +	string
>> +	default "credit" if SCHED_CREDIT_DEFAULT
>> +	default "credit2" if SCHED_CREDIT2_DEFAULT
>> +	default "rtds" if SCHED_RTDS_DEFAULT
>> +	default "arinc653" if SCHED_ARINC653_DEFAULT
>> +	default "credit"
>
> What use is this last line?
>

When the scheduler menu is not visible, the choice selection does not
cause a scheduler to be chosen. The last line forces credit to be the
default if none of the _DEFAULT values are selected. It is purely an
artifact of introducing the visibility option on the menu. It could be
moved into the defaults section for the choice like this:

+	default SCHED_CREDIT_DEFAULT if SCHED_CREDIT
+	default SCHED_CREDIT2_DEFAULT if SCHED_CREDIT2
+	default SCHED_RTDS_DEFAULT if SCHED_RTDS
+	default SCHED_ARINC653_DEFAULT if SCHED_ARINC653
+       default SCHED_CREDIT_DEFAULT


>> --- a/xen/include/xen/sched.h
>> +++ b/xen/include/xen/sched.h
>> @@ -850,8 +850,13 @@ static inline bool_t is_vcpu_online(const struct vcpu *v)
>>      return !test_bit(_VPF_down, &v->pause_flags);
>>  }
>>
>> +#ifdef CONFIG_SCHED_CREDIT
>>  void set_vcpu_migration_delay(unsigned int delay);
>>  unsigned int get_vcpu_migration_delay(void);
>> +#else
>> +static inline void set_vcpu_migration_delay(unsigned int delay) { }
>> +static inline unsigned int get_vcpu_migration_delay(void) { return 0; }
>> +#endif
>
> I don't think these are appropriate: The respective sysctl sub-ops
> would probably better indicate failure to the caller.

I can make that change if you want me to. As it stands now, the existing
sysctl sub-ops are probably not doing the right thing since they are
setting and getting this migration delay in the credit scheduler
regardless of which scheduler is actually in use.

  reply	other threads:[~2016-01-11 15:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 21:22 [PATCH v4 0/5] Allow schedulers to be selectable through Kconfig Jonathan Creekmore
2016-01-08 21:22 ` [PATCH v4 1/5] build: Env var to enable expert config options Jonathan Creekmore
2016-01-08 21:22 ` [PATCH v4 2/5] build: Hook the schedulers into Kconfig Jonathan Creekmore
2016-01-09 14:52   ` Andrew Cooper
2016-01-09 17:50     ` Jonathan Creekmore
2016-01-09 18:08       ` Andrew Cooper
2016-01-09 22:47         ` Jonathan Creekmore
2016-01-11 13:59         ` Jan Beulich
2016-01-11 14:07   ` Jan Beulich
2016-01-11 15:10     ` Jonathan Creekmore [this message]
2016-01-11 15:43       ` Jan Beulich
2016-01-11 16:31         ` Doug Goldstein
2016-01-11 16:49           ` Jan Beulich
2016-01-11 17:17             ` Doug Goldstein
2016-01-08 21:22 ` [PATCH v4 3/5] build: Alloc space for sched list in the link file Jonathan Creekmore
2016-01-09 18:25   ` Andrew Cooper
2016-01-09 22:46     ` Jonathan Creekmore
2016-01-08 21:22 ` [PATCH v4 4/5] sched: Register the schedulers into the list Jonathan Creekmore
2016-01-08 21:22 ` [PATCH v4 5/5] sched: Use the auto-generated list of schedulers Jonathan Creekmore
2016-01-09 18:28   ` Andrew Cooper
2016-01-09 22:43     ` Jonathan Creekmore

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=m237u440eu.fsf@Nebula.lan \
    --to=jonathan.creekmore@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=dario.faggioli@citrix.com \
    --cc=george.dunlap@eu.citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).