From patchwork Wed Jan 8 15:23:20 2020 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: 11323925 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 AF03E109A for ; Wed, 8 Jan 2020 15:24:51 +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 89BB220673 for ; Wed, 8 Jan 2020 15:24:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89BB220673 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 1ipDBO-0004QL-Gp; Wed, 08 Jan 2020 15:23:42 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ipDBN-0004PM-HT for xen-devel@lists.xenproject.org; Wed, 08 Jan 2020 15:23:41 +0000 X-Inumbo-ID: d43e4834-322a-11ea-9832-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d43e4834-322a-11ea-9832-bc764e2007e4; Wed, 08 Jan 2020 15:23:32 +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 66A8BB1E1; Wed, 8 Jan 2020 15:23:31 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Wed, 8 Jan 2020 16:23:20 +0100 Message-Id: <20200108152328.27194-2-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200108152328.27194-1-jgross@suse.com> References: <20200108152328.27194-1-jgross@suse.com> Subject: [Xen-devel] [PATCH v2 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 Reviewed-by: Dario Faggioli --- V2: - renamed sources (Dario Faggioli, Andrew Cooper) --- MAINTAINERS | 8 +-- xen/common/Kconfig | 66 +---------------------- xen/common/Makefile | 8 +-- xen/common/sched/Kconfig | 65 ++++++++++++++++++++++ xen/common/sched/Makefile | 7 +++ xen/common/{sched_arinc653.c => sched/arinc653.c} | 0 xen/common/{compat/schedule.c => sched/compat.c} | 2 +- xen/common/{schedule.c => sched/core.c} | 2 +- xen/common/{ => sched}/cpupool.c | 0 xen/common/{sched_credit.c => sched/credit.c} | 0 xen/common/{sched_credit2.c => sched/credit2.c} | 0 xen/common/{sched_null.c => sched/null.c} | 0 xen/common/{sched_rt.c => sched/rt.c} | 0 13 files changed, 80 insertions(+), 78 deletions(-) create mode 100644 xen/common/sched/Kconfig create mode 100644 xen/common/sched/Makefile rename xen/common/{sched_arinc653.c => sched/arinc653.c} (100%) rename xen/common/{compat/schedule.c => sched/compat.c} (97%) rename xen/common/{schedule.c => sched/core.c} (99%) rename xen/common/{ => sched}/cpupool.c (100%) rename xen/common/{sched_credit.c => sched/credit.c} (100%) rename xen/common/{sched_credit2.c => sched/credit2.c} (100%) rename xen/common/{sched_null.c => sched/null.c} (100%) rename xen/common/{sched_rt.c => sched/rt.c} (100%) diff --git a/MAINTAINERS b/MAINTAINERS index eaea4620e2..9d2ac631ba 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/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/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 b3d161d057..9d6d09eb37 100644 --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -275,71 +275,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..3537f2a68d --- /dev/null +++ b/xen/common/sched/Makefile @@ -0,0 +1,7 @@ +obj-y += cpupool.o +obj-$(CONFIG_SCHED_ARINC653) += arinc653.o +obj-$(CONFIG_SCHED_CREDIT) += credit.o +obj-$(CONFIG_SCHED_CREDIT2) += credit2.o +obj-$(CONFIG_SCHED_RTDS) += rt.o +obj-$(CONFIG_SCHED_NULL) += null.o +obj-y += core.o diff --git a/xen/common/sched_arinc653.c b/xen/common/sched/arinc653.c similarity index 100% rename from xen/common/sched_arinc653.c rename to xen/common/sched/arinc653.c diff --git a/xen/common/compat/schedule.c b/xen/common/sched/compat.c similarity index 97% rename from xen/common/compat/schedule.c rename to xen/common/sched/compat.c index 8b6e6f107d..040b4caca2 100644 --- a/xen/common/compat/schedule.c +++ b/xen/common/sched/compat.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 "core.c" int compat_set_timer_op(u32 lo, s32 hi) { diff --git a/xen/common/schedule.c b/xen/common/sched/core.c similarity index 99% rename from xen/common/schedule.c rename to xen/common/sched/core.c index 54a07ff9e8..4d8eb4c617 100644 --- a/xen/common/schedule.c +++ b/xen/common/sched/core.c @@ -3128,7 +3128,7 @@ void __init sched_setup_dom0_vcpus(struct domain *d) #endif #ifdef CONFIG_COMPAT -#include "compat/schedule.c" +#include "compat.c" #endif #endif /* !COMPAT */ 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_credit.c b/xen/common/sched/credit.c similarity index 100% rename from xen/common/sched_credit.c rename to xen/common/sched/credit.c diff --git a/xen/common/sched_credit2.c b/xen/common/sched/credit2.c similarity index 100% rename from xen/common/sched_credit2.c rename to xen/common/sched/credit2.c diff --git a/xen/common/sched_null.c b/xen/common/sched/null.c similarity index 100% rename from xen/common/sched_null.c rename to xen/common/sched/null.c diff --git a/xen/common/sched_rt.c b/xen/common/sched/rt.c similarity index 100% rename from xen/common/sched_rt.c rename to xen/common/sched/rt.c