From patchwork Fri Jan 15 17:01:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Creekmore X-Patchwork-Id: 8043441 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 67401BEEE5 for ; Fri, 15 Jan 2016 17:04:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58C122045A for ; Fri, 15 Jan 2016 17:04:32 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C132020453 for ; Fri, 15 Jan 2016 17:04:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aK7kz-0004cI-Ar; Fri, 15 Jan 2016 17:01:49 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aK7kx-0004bR-GL for xen-devel@lists.xenproject.org; Fri, 15 Jan 2016 17:01:47 +0000 Received: from [85.158.139.211] by server-14.bemta-5.messagelabs.com id 17/07-18633-AF529965; Fri, 15 Jan 2016 17:01:46 +0000 X-Env-Sender: jonathan.creekmore@gmail.com X-Msg-Ref: server-14.tower-206.messagelabs.com!1452877305!15849857!1 X-Originating-IP: [209.85.160.194] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 25116 invoked from network); 15 Jan 2016 17:01:46 -0000 Received: from mail-yk0-f194.google.com (HELO mail-yk0-f194.google.com) (209.85.160.194) by server-14.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 15 Jan 2016 17:01:46 -0000 Received: by mail-yk0-f194.google.com with SMTP id a85so34613166ykb.2 for ; Fri, 15 Jan 2016 09:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bsTflQfdDqw9XijXxfxc+CXd/XZCdoGiQ193rw6bP9g=; b=qmwAfcRfEer714+W0y1QTnekMSox1dWPYhNPop+UX3QObo1lCHnYkwmOU5WoLaGzG6 e4FVlABM8lDOj+zfUi6ZkhXJQaIfxfsi8tqPMre9/78ePmvgvRHxj8vrnhpXupKSzz1a IC7CrNSkm17rlnng6r3hSgLCjF+Y06hyKBq2Ji20IAXI1SN6DQ9zhALpns9NJcVNcCGR lS6SW4FOKedQ6PE3qMJ+APT5VW9HrsbDLlYisM13EaWd5Ah240laTkv1r4fWpeVhmpyq eVv5/OIuOQzT8l6+U7Cav5+9lqmv7OKLCg0DEaqDIEiB3iD6usJHHvaH7KVhiAXgvQDe +gog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bsTflQfdDqw9XijXxfxc+CXd/XZCdoGiQ193rw6bP9g=; b=KAWLfR2BbCE+Us3X8X10H4+fTcsr2OvWRl2ztiZUYyN365PC7x+7fLzgwCuODOf5pJ SnYx9l5171IiekR/CoPnJ0nxwxHq4s74HKbQudTYAO5p3R2V0+8sSs+9gs+XR3uZ1pS9 UNo6f94GZCsZrwJszQ/dUSnVAsVIFcLnHDzdjSnN0F5H36DQnQZimA38HO0Y+RR9CA1T OEPW3OQBqyLMA2EdVBdYPCINvsON1cPXYfT5ItRwu2v/pOleknFKsBtWizlG83ml0ih0 ZLHKafxtlw2ajP+JKdyNjwULIaZuP9Or5Muq4kPTAQlp/zgUXSgjYjZ64pVeZ1RZXYem 68mQ== X-Gm-Message-State: ALoCoQltcDMx6Iqr2LuTLEwlHcNqsMKK4TUTZgHbT4Vg8flDYHzXo/duSB4oaH3Sm3XVJlLbXk6GkInsbRScjyVLJVo25M6q1Q== X-Received: by 10.37.4.77 with SMTP id 74mr1250493ybe.186.1452877305279; Fri, 15 Jan 2016 09:01:45 -0800 (PST) Received: from Nebula.lan (c-68-34-224-206.hsd1.al.comcast.net. [68.34.224.206]) by smtp.gmail.com with ESMTPSA id a126sm8628879ywe.11.2016.01.15.09.01.44 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Jan 2016 09:01:44 -0800 (PST) From: Jonathan Creekmore To: xen-devel@lists.xenproject.org Date: Fri, 15 Jan 2016 11:01:36 -0600 Message-Id: <1452877299-59267-3-git-send-email-jonathan.creekmore@gmail.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1452877299-59267-1-git-send-email-jonathan.creekmore@gmail.com> References: <1452877299-59267-1-git-send-email-jonathan.creekmore@gmail.com> Cc: George Dunlap , Jonathan Creekmore , Dario Faggioli Subject: [Xen-devel] [PATCH v6 2/5] build: Hook the schedulers into Kconfig X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow the schedulers to be independently enabled or disabled at compile-time. To match existing behavior, all four schedulers are compiled in by default, although the Credit2, RTDS, and ARINC653 are marked EXPERIMENTAL to match their not currently supported status. CC: George Dunlap CC: Dario Faggioli Signed-off-by: Jonathan Creekmore Reviewed-by: Doug Goldstein Acked-by: Dario Faggioli --- Changed since v5: * Remove extra defaults for schedulers since credit is always there Changed since v4: * Removed the "if unsure" language * Removed ability to disable the "credit" scheduler * Remove stub vcpu_migration_delay functions since credit cannot be disabled Changed since v2: * Hid the scheduler menu behind the EXPERT option * Provide static inlines for credit functions that are assumed to be always available * Provide an absolute default of the credit scheduler if the scheduler menu is not visible Changed since v1: * Marked credit2 as EXPERIMENTAL * Removed confusing language from the commit message * Alphabetize the schedulers --- xen/common/Kconfig | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ xen/common/Makefile | 8 ++++---- xen/common/schedule.c | 12 +++++++++-- 3 files changed, 70 insertions(+), 6 deletions(-) diff --git a/xen/common/Kconfig b/xen/common/Kconfig index eadfc3b..7cc99c7 100644 --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -97,4 +97,60 @@ config XSM If unsure, say N. +# Enable schedulers +menu "Schedulers" + visible if EXPERT = "y" + +config SCHED_CREDIT + bool + default y + ---help--- + The traditional credit scheduler is a general purpose 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. + +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. + +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. + +choice + prompt "Default Scheduler?" + default SCHED_CREDIT_DEFAULT + + 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" + +endmenu + endmenu diff --git a/xen/common/Makefile b/xen/common/Makefile index 9f8b214..4df71ee 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -30,10 +30,10 @@ obj-y += rangeset.o obj-y += radix-tree.o obj-y += rbtree.o obj-y += rcupdate.o -obj-y += sched_credit.o -obj-y += sched_credit2.o -obj-y += sched_arinc653.o -obj-y += sched_rt.o +obj-$(CONFIG_SCHED_ARINC653) += sched_arinc653.o +obj-$(CONFIG_SCHED_CREDIT) += sched_credit.o +obj-$(CONFIG_SCHED_CREDIT2) += sched_credit2.o +obj-$(CONFIG_SCHED_RTDS) += sched_rt.o obj-y += schedule.o obj-y += shutdown.o obj-y += softirq.o diff --git a/xen/common/schedule.c b/xen/common/schedule.c index d121896..2f98a48 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -38,8 +38,8 @@ #include #include -/* opt_sched: scheduler - default to credit */ -static char __initdata opt_sched[10] = "credit"; +/* opt_sched: scheduler - default to configured value */ +static char __initdata opt_sched[10] = CONFIG_SCHED_DEFAULT; string_param("sched", opt_sched); /* if sched_smt_power_savings is set, @@ -65,10 +65,18 @@ DEFINE_PER_CPU(struct schedule_data, schedule_data); DEFINE_PER_CPU(struct scheduler *, scheduler); static const struct scheduler *schedulers[] = { +#ifdef CONFIG_SCHED_CREDIT &sched_credit_def, +#endif +#ifdef CONFIG_SCHED_CREDIT2 &sched_credit2_def, +#endif +#ifdef CONFIG_SCHED_ARINC653 &sched_arinc653_def, +#endif +#ifdef CONFIG_SCHED_RTDS &sched_rtds_def, +#endif }; static struct scheduler __read_mostly ops;