From patchwork Wed Dec 18 07:48:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 11299685 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C53C26C1 for ; Wed, 18 Dec 2019 07:50:43 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9EBBB2176D for ; Wed, 18 Dec 2019 07:50:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EBBB2176D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihU54-0003ew-B6; Wed, 18 Dec 2019 07:49:14 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihU52-0003eo-HD for xen-devel@lists.xenproject.org; Wed, 18 Dec 2019 07:49:12 +0000 X-Inumbo-ID: dc75c886-216a-11ea-9041-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id dc75c886-216a-11ea-9041-12813bfff9fa; Wed, 18 Dec 2019 07:49:04 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 13462AB9B; Wed, 18 Dec 2019 07:49:03 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Wed, 18 Dec 2019 08:48:51 +0100 Message-Id: <20191218074859.21665-2-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191218074859.21665-1-jgross@suse.com> References: <20191218074859.21665-1-jgross@suse.com> Subject: [Xen-devel] [PATCH 1/9] xen/sched: move schedulers and cpupool coding to dedicated directory X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Dario Faggioli , Josh Whitehead , Meng Xu , Jan Beulich , Stewart Hildebrand MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Move sched*c and cpupool.c to a new directory common/sched. Signed-off-by: Juergen Gross --- MAINTAINERS | 8 +-- xen/common/Kconfig | 66 +--------------------- xen/common/Makefile | 8 +-- xen/common/sched/Kconfig | 65 +++++++++++++++++++++ xen/common/sched/Makefile | 7 +++ .../{compat/schedule.c => sched/compat_schedule.c} | 2 +- xen/common/{ => sched}/cpupool.c | 0 xen/common/{ => sched}/sched_arinc653.c | 0 xen/common/{ => sched}/sched_credit.c | 0 xen/common/{ => sched}/sched_credit2.c | 0 xen/common/{ => sched}/sched_null.c | 0 xen/common/{ => sched}/sched_rt.c | 0 xen/common/{ => sched}/schedule.c | 2 +- 13 files changed, 80 insertions(+), 78 deletions(-) create mode 100644 xen/common/sched/Kconfig create mode 100644 xen/common/sched/Makefile rename xen/common/{compat/schedule.c => sched/compat_schedule.c} (97%) rename xen/common/{ => sched}/cpupool.c (100%) rename xen/common/{ => sched}/sched_arinc653.c (100%) rename xen/common/{ => sched}/sched_credit.c (100%) rename xen/common/{ => sched}/sched_credit2.c (100%) rename xen/common/{ => sched}/sched_null.c (100%) rename xen/common/{ => sched}/sched_rt.c (100%) rename xen/common/{ => sched}/schedule.c (99%) diff --git a/MAINTAINERS b/MAINTAINERS index 012c847ebd..37d4da2bc2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -174,7 +174,7 @@ M: Josh Whitehead M: Stewart Hildebrand S: Supported L: DornerWorks Xen-Devel -F: xen/common/sched_arinc653.c +F: xen/common/sched/sched_arinc653.c F: tools/libxc/xc_arinc653.c ARM (W/ VIRTUALISATION EXTENSIONS) ARCHITECTURE @@ -212,7 +212,7 @@ CPU POOLS M: Juergen Gross M: Dario Faggioli S: Supported -F: xen/common/cpupool.c +F: xen/common/sched/cpupool.c DEVICE TREE M: Stefano Stabellini @@ -378,13 +378,13 @@ RTDS SCHEDULER M: Dario Faggioli M: Meng Xu S: Supported -F: xen/common/sched_rt.c +F: xen/common/sched/sched_rt.c SCHEDULING M: George Dunlap M: Dario Faggioli S: Supported -F: xen/common/sched* +F: xen/common/sched/ SEABIOS UPSTREAM M: Wei Liu diff --git a/xen/common/Kconfig b/xen/common/Kconfig index 2f516da101..79465fc1f9 100644 --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -278,71 +278,7 @@ config ARGO If unsure, say N. -menu "Schedulers" - visible if EXPERT = "y" - -config SCHED_CREDIT - bool "Credit scheduler support" - default y - ---help--- - The traditional credit scheduler is a general purpose scheduler. - -config SCHED_CREDIT2 - bool "Credit2 scheduler support" - 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 DEBUG - ---help--- - The ARINC653 scheduler is a hard real-time scheduler for single - cores, targeted for avionics, drones, and medical devices. - -config SCHED_NULL - bool "Null scheduler support (EXPERIMENTAL)" - default y - ---help--- - The null scheduler is a static, zero overhead scheduler, - for when there always are less vCPUs than pCPUs, typically - in embedded or HPC scenarios. - -choice - prompt "Default Scheduler?" - default SCHED_CREDIT2_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 - config SCHED_NULL_DEFAULT - bool "Null Scheduler" if SCHED_NULL -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 "null" if SCHED_NULL_DEFAULT - default "credit2" - -endmenu +source "common/sched/Kconfig" config CRYPTO bool diff --git a/xen/common/Makefile b/xen/common/Makefile index 62b34e69e9..2abb8250b0 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -3,7 +3,6 @@ obj-y += bitmap.o obj-y += bsearch.o obj-$(CONFIG_CORE_PARKING) += core_parking.o obj-y += cpu.o -obj-y += cpupool.o obj-$(CONFIG_DEBUG_TRACE) += debugtrace.o obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o obj-y += domctl.o @@ -38,12 +37,6 @@ obj-y += radix-tree.o obj-y += rbtree.o obj-y += rcupdate.o obj-y += rwlock.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-$(CONFIG_SCHED_NULL) += sched_null.o -obj-y += schedule.o obj-y += shutdown.o obj-y += softirq.o obj-y += sort.o @@ -74,6 +67,7 @@ obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall extra-y := symbols-dummy.o subdir-$(CONFIG_COVERAGE) += coverage +subdir-y += sched subdir-$(CONFIG_UBSAN) += ubsan subdir-$(CONFIG_NEEDS_LIBELF) += libelf diff --git a/xen/common/sched/Kconfig b/xen/common/sched/Kconfig new file mode 100644 index 0000000000..883ac87cab --- /dev/null +++ b/xen/common/sched/Kconfig @@ -0,0 +1,65 @@ +menu "Schedulers" + visible if EXPERT = "y" + +config SCHED_CREDIT + bool "Credit scheduler support" + default y + ---help--- + The traditional credit scheduler is a general purpose scheduler. + +config SCHED_CREDIT2 + bool "Credit2 scheduler support" + 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 DEBUG + ---help--- + The ARINC653 scheduler is a hard real-time scheduler for single + cores, targeted for avionics, drones, and medical devices. + +config SCHED_NULL + bool "Null scheduler support (EXPERIMENTAL)" + default y + ---help--- + The null scheduler is a static, zero overhead scheduler, + for when there always are less vCPUs than pCPUs, typically + in embedded or HPC scenarios. + +choice + prompt "Default Scheduler?" + default SCHED_CREDIT2_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 + config SCHED_NULL_DEFAULT + bool "Null Scheduler" if SCHED_NULL +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 "null" if SCHED_NULL_DEFAULT + default "credit2" + +endmenu diff --git a/xen/common/sched/Makefile b/xen/common/sched/Makefile new file mode 100644 index 0000000000..359af4f8bb --- /dev/null +++ b/xen/common/sched/Makefile @@ -0,0 +1,7 @@ +obj-y += cpupool.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-$(CONFIG_SCHED_NULL) += sched_null.o +obj-y += schedule.o diff --git a/xen/common/compat/schedule.c b/xen/common/sched/compat_schedule.c similarity index 97% rename from xen/common/compat/schedule.c rename to xen/common/sched/compat_schedule.c index 8b6e6f107d..2e450685d6 100644 --- a/xen/common/compat/schedule.c +++ b/xen/common/sched/compat_schedule.c @@ -37,7 +37,7 @@ static int compat_poll(struct compat_sched_poll *compat) #define do_poll compat_poll #define sched_poll compat_sched_poll -#include "../schedule.c" +#include "schedule.c" int compat_set_timer_op(u32 lo, s32 hi) { diff --git a/xen/common/cpupool.c b/xen/common/sched/cpupool.c similarity index 100% rename from xen/common/cpupool.c rename to xen/common/sched/cpupool.c diff --git a/xen/common/sched_arinc653.c b/xen/common/sched/sched_arinc653.c similarity index 100% rename from xen/common/sched_arinc653.c rename to xen/common/sched/sched_arinc653.c diff --git a/xen/common/sched_credit.c b/xen/common/sched/sched_credit.c similarity index 100% rename from xen/common/sched_credit.c rename to xen/common/sched/sched_credit.c diff --git a/xen/common/sched_credit2.c b/xen/common/sched/sched_credit2.c similarity index 100% rename from xen/common/sched_credit2.c rename to xen/common/sched/sched_credit2.c diff --git a/xen/common/sched_null.c b/xen/common/sched/sched_null.c similarity index 100% rename from xen/common/sched_null.c rename to xen/common/sched/sched_null.c diff --git a/xen/common/sched_rt.c b/xen/common/sched/sched_rt.c similarity index 100% rename from xen/common/sched_rt.c rename to xen/common/sched/sched_rt.c diff --git a/xen/common/schedule.c b/xen/common/sched/schedule.c similarity index 99% rename from xen/common/schedule.c rename to xen/common/sched/schedule.c index e70cc70a65..a550dd8f93 100644 --- a/xen/common/schedule.c +++ b/xen/common/sched/schedule.c @@ -3125,7 +3125,7 @@ void __init sched_setup_dom0_vcpus(struct domain *d) #endif #ifdef CONFIG_COMPAT -#include "compat/schedule.c" +#include "compat_schedule.c" #endif #endif /* !COMPAT */