[Xen-devel] [PATCH RFC V2 06/45] xen/sched: introduce struct sched_resource

2019-05-05 Thread Juergen Gross
core or socket only. Signed-off-by: Juergen Gross --- xen/common/sched_credit.c | 2 ++ xen/common/sched_credit2.c | 7 +++ xen/common/sched_null.c| 3 +++ xen/common/sched_rt.c | 2 ++ xen/common/schedule.c | 15 +++ xen/include/xen/sched-if.h | 8 xen

[Xen-devel] [PATCH RFC V2 08/45] xen/sched: switch schedule_data.curr to point at sched_item

2019-05-05 Thread Juergen Gross
In preparation of core scheduling let the percpu pointer schedule_data.curr point to a strct sched_item instead of the related vcpu. At the same time rename the per-vcpu scheduler specific structs to per-item ones. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 2 +- xen

[Xen-devel] [PATCH RFC V2 42/45] xen/sched: add fall back to idle vcpu when scheduling item

2019-05-05 Thread Juergen Gross
ctive previously, so save the previous item pointer in the per-schedule resource area and use its value being non-NULL as a hint whether context_saved() should be called. Signed-off-by: Juergen Gross --- RFC V2: new patch (Andrew Cooper) --- xen/arch/x86/domain.c | 21 ++ xen/c

[Xen-devel] [PATCH RFC V2 20/45] xen/sched: make credit scheduler vcpu agnostic.

2019-05-05 Thread Juergen Gross
Switch credit scheduler completely from vcpu to sched_item usage. Signed-off-by: Juergen Gross --- xen/common/sched_credit.c | 504 +++--- 1 file changed, 251 insertions(+), 253 deletions(-) diff --git a/xen/common/sched_credit.c b/xen/common

[Xen-devel] [PATCH RFC V2 21/45] xen/sched: make credit2 scheduler vcpu agnostic.

2019-05-05 Thread Juergen Gross
Switch credit2 scheduler completely from vcpu to sched_item usage. As we are touching lots of lines remove some white space at the end of the line, too. Signed-off-by: Juergen Gross --- xen/common/sched_credit2.c | 820 ++--- 1 file changed, 403

[Xen-devel] [PATCH RFC V2 09/45] xen/sched: move per cpu scheduler private data into struct sched_resource

2019-05-06 Thread Juergen Gross
This prepares support of larger scheduling granularities, e.g. core scheduling. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 6 ++--- xen/common/sched_credit.c | 14 +-- xen/common/sched_credit2.c| 24 +-- xen/common/sched_null.c | 8

Re: [Xen-devel] [PATCH RFC V2 00/45] xen: add core scheduling support

2019-05-06 Thread Juergen Gross
On 06/05/2019 08:55, Juergen Gross wrote: > Add support for core- and socket-scheduling in the Xen hypervisor. The series is available under: github.com/jgross1/xen.git sched-rfc-v2 Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.

Re: [Xen-devel] {xen, dom0}_vga_console_info.u.vesa_lfb.lfb_base field too small

2019-05-06 Thread Juergen Gross
On 05/05/2019 15:27, Marek Marczykowski-Górecki wrote: > Hi, > > I have a machine that allocate vesa LFB above 4GB, as reported by UEFI > GOP. At 0x40 to be specific. > vga_console_info.u.vesa_lfb.lfb_base is a 32bit field, so it gets > truncated, leading to all kind of memory corruptions

Re: [Xen-devel] [PATCH] xen-blkfront: switch kcalloc to kvcalloc for large array allocation

2019-05-06 Thread Juergen Gross
On 03/05/2019 17:04, Roger Pau Monne wrote: > There's no reason to request physically contiguous memory for those > allocations. > > Reported-by: Ian Jackson > Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Juergen _

Re: [Xen-devel] [PATCH RFC V2 01/45] xen/sched: add inline wrappers for calling per-scheduler functions

2019-05-06 Thread Juergen Gross
On 06/05/2019 10:27, Jan Beulich wrote: On 06.05.19 at 08:56, wrote: >> @@ -207,6 +250,141 @@ static inline void sched_free_domdata(const struct >> scheduler *s, >> ASSERT(!data); >> } >> >> +static inline void *sched_alloc_pdata(const struct scheduler *s, int cpu) >> +{ >> +

Re: [Xen-devel] [PATCH RFC V2 30/45] xen/sched: rework and rename vcpu_force_reschedule()

2019-05-06 Thread Juergen Gross
On 06/05/2019 10:37, Jan Beulich wrote: On 06.05.19 at 08:56, wrote: >> --- a/xen/common/schedule.c >> +++ b/xen/common/schedule.c >> @@ -808,21 +808,24 @@ static void vcpu_migrate_finish(struct vcpu *v) >> } >> >> /* >> - * Force a VCPU through a deschedule/reschedule path. >> - * For ex

Re: [Xen-devel] [PATCH RFC V2 45/45] xen/sched: add scheduling granularity enum

2019-05-06 Thread Juergen Gross
On 06/05/2019 10:57, Jan Beulich wrote: On 06.05.19 at 08:56, wrote: >> --- a/xen/arch/x86/setup.c >> +++ b/xen/arch/x86/setup.c >> @@ -1701,6 +1701,8 @@ void __init noreturn __start_xen(unsigned long mbi_p) >> printk(XENLOG_INFO "Parked %u CPUs\n", num_parked); >> smp_cpus_done

Re: [Xen-devel] [PATCH RFC V2 45/45] xen/sched: add scheduling granularity enum

2019-05-06 Thread Juergen Gross
On 06/05/2019 12:01, Jan Beulich wrote: On 06.05.19 at 11:23, wrote: >> On 06/05/2019 10:57, Jan Beulich wrote: >> On 06.05.19 at 08:56, wrote: void scheduler_percpu_init(unsigned int cpu) { struct scheduler *sched = per_cpu(scheduler, cpu); struct sched_r

Re: [Xen-devel] [PATCH RFC V2 45/45] xen/sched: add scheduling granularity enum

2019-05-06 Thread Juergen Gross
On 06/05/2019 13:58, Jan Beulich wrote: On 06.05.19 at 12:20, wrote: >> On 06/05/2019 12:01, Jan Beulich wrote: >> On 06.05.19 at 11:23, wrote: On 06/05/2019 10:57, Jan Beulich wrote: > . Yet then I'm a little puzzled by its use here in the first place. > Generally I think f

Re: [Xen-devel] [PATCH RFC V2 45/45] xen/sched: add scheduling granularity enum

2019-05-06 Thread Juergen Gross
On 06/05/2019 15:14, Jan Beulich wrote: On 06.05.19 at 14:23, wrote: >> On 06/05/2019 13:58, Jan Beulich wrote: >> On 06.05.19 at 12:20, wrote: On 06/05/2019 12:01, Jan Beulich wrote: On 06.05.19 at 11:23, wrote: >> On 06/05/2019 10:57, Jan Beulich wrote: >>> . Yet

Re: [Xen-devel] [PATCH 4/5] xen: fix handling framebuffer located above 4GB

2019-05-06 Thread Juergen Gross
On 06/05/2019 16:50, Marek Marczykowski-Górecki wrote: > On some machines (for example Thinkpad P52), UEFI GOP reports > framebuffer located above 4GB (0x40 on that machine). This > address does not fit in {xen,dom0}_vga_console_info.u.vesa_lfb.lfb_base > field, which is 32bit. The overflow

Re: [Xen-devel] [PATCH 4/5] xen: fix handling framebuffer located above 4GB

2019-05-06 Thread Juergen Gross
On 06/05/2019 17:32, Marek Marczykowski-Górecki wrote: > On Mon, May 06, 2019 at 05:15:19PM +0200, Juergen Gross wrote: >> On 06/05/2019 16:50, Marek Marczykowski-Górecki wrote: >>> diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h >>> index ccdffc0..b

Re: [Xen-devel] [PATCH] libxl: don't enable synthetic timer by default

2019-05-07 Thread Juergen Gross
On 07/05/2019 15:36, Wei Liu wrote: > It broke Windows installation. More investigation is needed. Don't > enable it by default. > > Signed-off-by: Wei Liu Thanks! Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenpr

[Xen-devel] [PATCH] xen/sched: fix csched2_deinit_pdata()

2019-05-08 Thread Juergen Gross
data of the old scheduler. Signed-off-by: Juergen Gross --- xen/common/sched_credit2.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 6958b265fc..9c1c3b4e08 100644 --- a/xen/common/sched_cred

Re: [Xen-devel] [PATCH] MAINTAINERS: Add explicit check-in policy section

2019-05-08 Thread Juergen Gross
On 08/05/2019 13:39, George Dunlap wrote: > The "nesting" section in the MAINTAINERS file was not initially > intended to describe the check-in policy for patches, but only how > nesting worked; but since there was no check-in policy, it has been > acting as a de-facto policy. > > One problem with

Re: [Xen-devel] [PATCH RFC V2 45/45] xen/sched: add scheduling granularity enum

2019-05-08 Thread Juergen Gross
On 06/05/2019 12:01, Jan Beulich wrote: On 06.05.19 at 11:23, wrote: >> And that was mentioned in the cover letter: cpu hotplug is not yet >> handled (hence the RFC status of the series). >> >> When cpu hotplug is being added it might be appropriate to switch the >> scheme as you suggested. R

Re: [Xen-devel] [PATCH RFC V2 01/45] xen/sched: add inline wrappers for calling per-scheduler functions

2019-05-08 Thread Juergen Gross
On 08/05/2019 18:24, George Dunlap wrote: > On 5/6/19 7:56 AM, Juergen Gross wrote: >> Instead of using the SCHED_OP() macro to call the different scheduler >> specific functions add inline wrappers for that purpose. >> >> Signed-off-by: Juergen Gross > > This se

Re: [Xen-devel] [PATCH RFC V2 02/45] xen/sched: use new sched_item instead of vcpu in scheduler interfaces

2019-05-08 Thread Juergen Gross
On 08/05/2019 18:35, George Dunlap wrote: > On 5/6/19 7:56 AM, Juergen Gross wrote: >> In order to prepare core- and socket-scheduling use a new struct >> sched_item instead of struct vcpu for interfaces of the different >> schedulers. >> >> Rename the per-sc

Re: [Xen-devel] [PATCH RFC V2 02/45] xen/sched: use new sched_item instead of vcpu in scheduler interfaces

2019-05-08 Thread Juergen Gross
On 09/05/2019 07:56, Dario Faggioli wrote: > On Thu, 2019-05-09 at 07:36 +0200, Juergen Gross wrote: >> On 08/05/2019 18:35, George Dunlap wrote: >>> On 5/6/19 7:56 AM, Juergen Gross wrote: >>>> >>> 'item' really seems like the wrong word here. To

Re: [Xen-devel] [PATCH RFC V2 01/45] xen/sched: add inline wrappers for calling per-scheduler functions

2019-05-09 Thread Juergen Gross
On 09/05/2019 12:04, George Dunlap wrote: > On 5/9/19 6:32 AM, Juergen Gross wrote: >> On 08/05/2019 18:24, George Dunlap wrote: >>> On 5/6/19 7:56 AM, Juergen Gross wrote: >>>> Instead of using the SCHED_OP() macro to call the different scheduler >>>>

Re: [Xen-devel] [PATCH RFC V2 01/45] xen/sched: add inline wrappers for calling per-scheduler functions

2019-05-09 Thread Juergen Gross
On 09/05/2019 13:50, Jan Beulich wrote: >>>> On 09.05.19 at 12:56, wrote: >> On 09/05/2019 12:04, George Dunlap wrote: >>> On 5/9/19 6:32 AM, Juergen Gross wrote: >>>> On 08/05/2019 18:24, George Dunlap wrote: >>>>> On 5/6/19 7:56 AM, Jue

Re: [Xen-devel] [PATCH RFC V2 01/45] xen/sched: add inline wrappers for calling per-scheduler functions

2019-05-09 Thread Juergen Gross
On 09/05/2019 14:31, Jan Beulich wrote: >>>> On 09.05.19 at 14:03, wrote: >> On 09/05/2019 13:50, Jan Beulich wrote: >>>>>> On 09.05.19 at 12:56, wrote: >>>> On 09/05/2019 12:04, George Dunlap wrote: >>>>> On 5/9/19 6:32 AM, Juerg

Re: [Xen-devel] [PATCH v2 4/5] xen: fix handling framebuffer located above 4GB

2019-05-09 Thread Juergen Gross
nsole.dom0.info_size), Linux can detect when > this field is present and use it appropriately then. > > Signed-off-by: Marek Marczykowski-Górecki Public interface part: Reviewed-by: Juergen Gross Juergen ___ Xen-devel mailing list Xen-devel@list

Re: [Xen-devel] [PATCH] xenbus: Avoid deadlock during suspend due to open transactions

2019-05-09 Thread Juergen Gross
On 08/05/2019 12:28, Ross Lagerwall wrote: > During a suspend/resume, the xenwatch thread waits for all outstanding > xenstore requests and transactions to complete. This does not work > correctly for transactions started by userspace because it waits for > them to complete after freezing userspace

Re: [Xen-devel] [PATCH RFC V2 45/45] xen/sched: add scheduling granularity enum

2019-05-10 Thread Juergen Gross
On 10/05/2019 10:53, Jan Beulich wrote: On 08.05.19 at 16:36, wrote: >> On 06/05/2019 12:01, Jan Beulich wrote: >> On 06.05.19 at 11:23, wrote: And that was mentioned in the cover letter: cpu hotplug is not yet handled (hence the RFC status of the series). When cpu ho

Re: [Xen-devel] [PATCH RFC V2 45/45] xen/sched: add scheduling granularity enum

2019-05-10 Thread Juergen Gross
On 10/05/2019 12:29, Dario Faggioli wrote: > On Fri, 2019-05-10 at 11:00 +0200, Juergen Gross wrote: >> On 10/05/2019 10:53, Jan Beulich wrote: >>>>>> On 08.05.19 at 16:36, wrote: >>>> >>>> With sched-gran=core or sched-gran=socket offlining a

Re: [Xen-devel] [xen-unstable test] 135931: regressions - FAIL

2019-05-11 Thread Juergen Gross
On 11/05/2019 13:20, osstest service owner wrote: > flight 135931 xen-unstable real [real] > http://logs.test-lab.xenproject.org/osstest/logs/135931/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be run: > test-amd64-i386-xl 23

Re: [Xen-devel] [xen-unstable test] 135931: regressions - FAIL

2019-05-11 Thread Juergen Gross
On 11/05/2019 19:57, Wei Liu wrote: > On Sat, May 11, 2019 at 02:29:53PM +0200, Juergen Gross wrote: >> On 11/05/2019 13:20, osstest service owner wrote: >>> flight 135931 xen-unstable real [real] >>> http://logs.test-lab.xenproject.org/osstest/logs/135931/ >>&g

[Xen-devel] Commit moratorium is lifted

2019-05-12 Thread Juergen Gross
Committers, The commit moratorium is lifted. Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Anyone using blktap2?

2019-05-13 Thread Juergen Gross
On 13/05/2019 17:34, Wei Liu wrote: > Hello > > Seeing that you were the last people who changed blktap2 in a meaningful > way: do you use it at all? Not me. I was only changing it to comply with the rest of the build (adding pkg-config file). I SUSE builds (SLE, openSUSE) it is not configured.

[Xen-devel] [GIT PULL] xen: fixes and features for 5.2-rc1

2019-05-15 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-5.2b-rc1-tag xen: fixes and features for 5.2-rc1 It contains: - some minor cleanups - 2 small corrections for Xen on ARM - 2 fixes for Xen PVH guest support - a patch for a new comman

[Xen-devel] Regression in xen-unstable due to commit 3802ecbaa9eb36

2019-05-16 Thread Juergen Gross
The patch "libxl: add helper function to set device_model_version" breaks creating any domain for me. Creating a PV or HVM guest will trigger the assertion assert(b_info->device_model_version); added by that patch. Removing this assert() will then trigger xl: libxl.c:339: libxl_defbool_val: Ass

Re: [Xen-devel] Regression in xen-unstable due to commit 3802ecbaa9eb36

2019-05-16 Thread Juergen Gross
On 16/05/2019 10:27, Olaf Hering wrote: > Am Thu, 16 May 2019 10:09:38 +0200 > schrieb Juergen Gross : > >> Has this patch ever been tested to work? > > With PV only. I will have a look. I can't even start a PV domU (maybe that is due t

Re: [Xen-devel] Regression in xen-unstable due to commit 3802ecbaa9eb36

2019-05-16 Thread Juergen Gross
On 16/05/2019 10:30, Olaf Hering wrote: > Am Thu, 16 May 2019 10:27:06 +0200 > schrieb Olaf Hering : > >> Am Thu, 16 May 2019 10:09:38 +0200 >> schrieb Juergen Gross : >>> Has this patch ever been tested to work? >> With PV only. I will have a

Re: [Xen-devel] Regression in xen-unstable due to commit 3802ecbaa9eb36

2019-05-16 Thread Juergen Gross
On 16/05/2019 10:40, Olaf Hering wrote: > Am Thu, 16 May 2019 10:09:38 +0200 > schrieb Juergen Gross : > >> assert(b_info->device_model_version); > > Is the codepath perhaps coming from libxl_domain_need_memory? Yes: (gdb) bt #0 0x76f1b0c7 in raise ()

Re: [Xen-devel] [PATCH] libxl: fix regression introduced in 5c883cf036cf

2019-05-16 Thread Juergen Gross
On 16/05/2019 11:11, Wei Liu wrote: > Two lines were erroneously deleted during rebase which caused domain > destruction to fail. > > Signed-off-by: Wei Liu Tested-by: Juergen Gross Reviewed-by: Juergen Gross Juergen ___ Xen-devel

Re: [Xen-devel] [PATCH RFC V2 24/45] xen: let vcpu_create() select processor

2019-05-16 Thread Juergen Gross
On 16/05/2019 14:20, Jan Beulich wrote: On 06.05.19 at 08:56, wrote: >> --- a/xen/common/schedule.c >> +++ b/xen/common/schedule.c >> @@ -314,14 +314,42 @@ static struct sched_item *sched_alloc_item(struct vcpu >> *v) >> return NULL; >> } >> >> -int sched_init_vcpu(struct vcpu *v, un

Re: [Xen-devel] [PATCH RFC V2 36/45] x86: make loading of GDT at context switch more modular

2019-05-16 Thread Juergen Gross
On 16/05/2019 14:30, Jan Beulich wrote: On 06.05.19 at 08:56, wrote: >> --- a/xen/arch/x86/domain.c >> +++ b/xen/arch/x86/domain.c >> @@ -1619,6 +1619,37 @@ static inline bool need_full_gdt(const struct domain >> *d) >> return is_pv_domain(d) && !is_idle_domain(d); >> } >> >> +static

Re: [Xen-devel] [PATCH RFC V2 37/45] x86: optimize loading of GDT at context switch

2019-05-16 Thread Juergen Gross
differ twice. >> >> Cache the need_full_gdt(nd) value in a local variable. >> >> Signed-off-by: Juergen Gross > > To be honest I'm not entirely convinced this is a good move. But > since you've done the work, and since the larger source size is > h

Re: [Xen-devel] [PATCH RFC V2 42/45] xen/sched: add fall back to idle vcpu when scheduling item

2019-05-16 Thread Juergen Gross
On 16/05/2019 15:05, Jan Beulich wrote: On 06.05.19 at 08:56, wrote: >> --- a/xen/arch/x86/domain.c >> +++ b/xen/arch/x86/domain.c >> @@ -154,6 +154,24 @@ static void idle_loop(void) >> } >> } >> >> +/* >> + * Idle loop for siblings of active schedule items. >> + * We don't do any sta

Re: [Xen-devel] [PATCH RFC V2 42/45] xen/sched: add fall back to idle vcpu when scheduling item

2019-05-16 Thread Juergen Gross
On 16/05/2019 16:41, Jan Beulich wrote: On 16.05.19 at 15:51, wrote: >> On 16/05/2019 15:05, Jan Beulich wrote: >> On 06.05.19 at 08:56, wrote: --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -154,6 +154,24 @@ static void idle_loop(void) } }

Re: [Xen-devel] [PATCH RFC V2 42/45] xen/sched: add fall back to idle vcpu when scheduling item

2019-05-17 Thread Juergen Gross
On 17/05/2019 08:57, Jan Beulich wrote: On 17.05.19 at 07:13, wrote: >> On 16/05/2019 16:41, Jan Beulich wrote: >> On 16.05.19 at 15:51, wrote: On 16/05/2019 15:05, Jan Beulich wrote: On 06.05.19 at 08:56, wrote: >> --- a/xen/arch/x86/domain.c >> +++ b/xen/arch/x86

Re: [Xen-devel] [PATCH RFC V2 42/45] xen/sched: add fall back to idle vcpu when scheduling item

2019-05-17 Thread Juergen Gross
On 17/05/2019 10:22, Jan Beulich wrote: On 17.05.19 at 09:48, wrote: >> On 17/05/2019 08:57, Jan Beulich wrote: >> On 17.05.19 at 07:13, wrote: On 16/05/2019 16:41, Jan Beulich wrote: On 16.05.19 at 15:51, wrote: >> As with core scheduling we can be sure the other thre

Re: [Xen-devel] Ping: [PATCH] xen/sched: fix csched2_deinit_pdata()

2019-05-17 Thread Juergen Gross
Avoid that by removing the cpu from the list of active cpus in credit2 >> data first. >> >> The opposite problem is occurring when removing a cpu from a cpupool: >> init_pdata() of credit2 will access the per-cpu data of the old >> scheduler. >> >> Signed-off-

Re: [Xen-devel] Ping: [PATCH] xen/sched: fix csched2_deinit_pdata()

2019-05-17 Thread Juergen Gross
of the just moved cpu. This >>>> will (depending on the new scheduler) either clobber the data of the >>>> new scheduler or in case of sched_rt lead to a crash. >>>> >>>> Avoid that by removing the cpu from the list of active cpus in credit2 >>>&

Re: [Xen-devel] Linux 3.18 no longer boots under Xen, please fix

2019-05-20 Thread Juergen Gross
On 20/05/2019 12:46, Ian Jackson wrote: > This has been true for some time. osstest has been sending automatic > mails including bisection reports like the one below, for about a > month. > > osstest's "tested and good" branch of linux-3.18 is 190 days behind > the upstream tip. > > Do we care a

[Xen-devel] [PATCH 0/3] tune preempt_[dis|en]able()

2019-05-22 Thread Juergen Gross
There is no user of the preempt_count for non-debug builds. This series removes it for that case. Juergen Gross (3): xen: drop in_atomic() xen: drop preempt_count() for non-debug builds xen: build common/preempt.c only with CONFIG_DEBUG xen/arch/x86/hvm/hvm.c| 16 xen

[Xen-devel] [PATCH 1/3] xen: drop in_atomic()

2019-05-22 Thread Juergen Gross
. Signed-off-by: Juergen Gross --- xen/arch/x86/hvm/hvm.c| 16 xen/common/preempt.c | 5 - xen/include/xen/preempt.h | 2 -- 3 files changed, 23 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 8993c2aa57..7b36765b97 100644 --- a/xen

[Xen-devel] [PATCH 2/3] xen: drop preempt_count() for non-debug builds

2019-05-22 Thread Juergen Gross
preempt_count() and the associated per-cpu variable __preempt_count are tested in debug build only. So drop them for non-debug builds. Signed-off-by: Juergen Gross --- xen/common/preempt.c | 2 +- xen/include/xen/preempt.h | 6 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff

[Xen-devel] [PATCH 3/3] xen: build common/preempt.c only with CONFIG_DEBUG

2019-05-22 Thread Juergen Gross
There is nothing left in common/preempt.c in non-debug builds. Signed-off-by: Juergen Gross --- xen/common/Makefile | 2 +- xen/common/preempt.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/common/Makefile b/xen/common/Makefile index 33d03b862f..d6576a3fc3 100644

Re: [Xen-devel] [PATCH 2/3] xen: drop preempt_count() for non-debug builds

2019-05-22 Thread Juergen Gross
On 22/05/2019 12:00, Andrew Cooper wrote: > On 22/05/2019 10:45, Juergen Gross wrote: >> preempt_count() and the associated per-cpu variable __preempt_count >> are tested in debug build only. So drop them for non-debug builds. >> >> Signed-off-by: Juergen Gross > &g

Re: [Xen-devel] [PATCH 2/3] xen: drop preempt_count() for non-debug builds

2019-05-22 Thread Juergen Gross
On 22/05/2019 12:12, Jan Beulich wrote: On 22.05.19 at 11:45, wrote: >> @@ -26,9 +28,11 @@ DECLARE_PER_CPU(unsigned int, __preempt_count); >> preempt_count()--; \ >> } while (0) >> >> -#ifndef NDEBUG >> void ASSERT_NOT_IN_ATOMIC(void); >> + >> #else >> +#def

Re: [Xen-devel] [PATCH 1/3] xen: drop in_atomic()

2019-05-22 Thread Juergen Gross
On 22/05/2019 12:10, Jan Beulich wrote: On 22.05.19 at 11:45, wrote: >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -3185,22 +3185,6 @@ static enum hvm_translation_result __hvm_copy( >> >> ASSERT(is_hvm_vcpu(v)); >> >> -/* >> - * XXX Disable for 4.1.0:

Re: [Xen-devel] [PATCH 2/3] xen: drop preempt_count() for non-debug builds

2019-05-22 Thread Juergen Gross
On 22/05/2019 12:18, Jan Beulich wrote: >>>> On 22.05.19 at 12:00, wrote: >> On 22/05/2019 10:45, Juergen Gross wrote: >>> preempt_count() and the associated per-cpu variable __preempt_count >>> are tested in debug build only. So drop them for non-debug bu

Re: [Xen-devel] [PATCH 1/3] xen: drop in_atomic()

2019-05-22 Thread Juergen Gross
On 22/05/2019 14:34, Jan Beulich wrote: On 22.05.19 at 12:19, wrote: >> On 22/05/2019 12:10, Jan Beulich wrote: >> On 22.05.19 at 11:45, wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3185,22 +3185,6 @@ static enum hvm_translation_result __hvm_copy( >

Re: [Xen-devel] [PATCH 1/3] xen: drop in_atomic()

2019-05-23 Thread Juergen Gross
On 22/05/2019 12:10, Jan Beulich wrote: On 22.05.19 at 11:45, wrote: >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -3185,22 +3185,6 @@ static enum hvm_translation_result __hvm_copy( >> >> ASSERT(is_hvm_vcpu(v)); >> >> -/* >> - * XXX Disable for 4.1.0:

Re: [Xen-devel] [PATCH 1/3] xen: drop in_atomic()

2019-05-24 Thread Juergen Gross
On 24/05/2019 08:38, Jan Beulich wrote: On 24.05.19 at 07:41, wrote: >> On 22/05/2019 12:10, Jan Beulich wrote: >> On 22.05.19 at 11:45, wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3185,22 +3185,6 @@ static enum hvm_translation_result __hvm_copy( >

[Xen-devel] [PATCH] xen/vm_event: fix rc check for uninitialized ring

2019-05-24 Thread Juergen Gross
vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring since commit 15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event lists on domain creation"), but the callers test for -ENOSYS. Correct the callers. Signed-off-by: Juergen Gross --- xen/arch/x86/mm/p2m.c | 2 +-

Re: [Xen-devel] [PATCH] xen/vm_event: fix rc check for uninitialized ring

2019-05-24 Thread Juergen Gross
On 24/05/2019 16:05, Razvan Cojocaru wrote: > On 5/24/19 4:15 PM, Juergen Gross wrote: >> vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring >> since commit 15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event >> lists on domain creation"), b

Re: [Xen-devel] [PATCH] xen/vm_event: fix rc check for uninitialized ring

2019-05-24 Thread Juergen Gross
On 24/05/2019 16:11, Jan Beulich wrote: On 24.05.19 at 15:15, wrote: >> --- a/xen/arch/x86/mm/p2m.c >> +++ b/xen/arch/x86/mm/p2m.c >> @@ -1705,7 +1705,7 @@ void p2m_mem_paging_populate(struct domain *d, >> unsigned long gfn_l) >> >> /* We're paging. There should be a ring */ >> i

[Xen-devel] [PATCH v2] xen/vm_event: fix rc check for uninitialized ring

2019-05-24 Thread Juergen Gross
vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring since commit 15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event lists on domain creation"), but the callers test for -ENOSYS. Correct the callers. Signed-off-by: Juergen Gross --- V2: add blank line (J

Re: [Xen-devel] [RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-05-25 Thread Juergen Gross
hen Hemminger > Cc: Sasha Levin > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: x...@kernel.org > Cc: Juergen Gross > Cc: Paolo Bonzini > Cc: Dave Hansen > Cc: Andy Lutomirski > Cc: Peter Zijlstra > Cc: Boris Ostrovsky > Cc:

Re: [Xen-devel] [PATCH -next] xen/pvcalls: Remove set but not used variable

2019-05-26 Thread Juergen Gross
drivers/xen/pvcalls-front.c: In function pvcalls_front_recvmsg: > drivers/xen/pvcalls-front.c:638:25: warning: variable bedata set but not used > [-Wunused-but-set-variable] > > They are never used since introduction. > > Signed-off-by: YueH

Re: [Xen-devel] [PATCH v2] xenbus: Avoid deadlock during suspend due to open transactions

2019-05-26 Thread Juergen Gross
scarded, return OK > since no changes were made anyway. > > This only affects users of the xenbus file interface. In-kernel users of > xenbus are assumed to be well-behaved and complete all transactions > before freezing. > > Signed-off-by: Ross Lagerwall Reviewed-by: Juergen G

[Xen-devel] [PATCH 1/3] xen: remove tmem driver

2019-05-27 Thread Juergen Gross
The Xen tmem (transcendent memory) driver can be removed, as the related Xen hypervisor feature never made it past the "experimental" state and will be removed in future Xen versions (>= 4.13). The xen-selfballoon driver depends on tmem, so it can be removed, too. Signed-off-by:

[Xen-devel] [PATCH 0/3] remove tmem and code depending on it

2019-05-27 Thread Juergen Gross
Tmem has been an experimental Xen feature which has been dropped recently due to security problems and lack of maintainership. So it is time now to drop it in Linux kernel, too. Juergen Gross (3): xen: remove tmem driver mm: remove cleancache.c mm: remove tmem specifics from frontswap

[Xen-devel] [PATCH 00/60] xen: add core scheduling support

2019-05-28 Thread Juergen Gross
: - ARM is building now - HVM domains are working now - idling will always be done with idle_vcpu active - other small changes see individual patches Juergen Gross (60): xen/sched: only allow schedulers with all mandatory functions available xen/sched: add inline wrappers for calling per-sc

[Xen-devel] [PATCH 03/60] xen/sched: let sched_switch_sched() return new lock address

2019-05-28 Thread Juergen Gross
new struct scheduler and struct schedule_data values in the percpu area in schedule_cpu_switch() instead of the schedulers, too. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 14 ++ xen/common/sched_credit.c | 13 ++--- xen/common/sched_credit2.c | 15

[Xen-devel] [PATCH 16/60] xen/sched: add id to struct sched_unit

2019-05-28 Thread Juergen Gross
Add an identifier to sched_unit. For now it will be the same as the related vcpu_id. Signed-off-by: Juergen Gross --- xen/common/schedule.c | 3 ++- xen/include/xen/sched.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index

[Xen-devel] [PATCH 11/60] xen/sched: move per cpu scheduler private data into struct sched_resource

2019-05-28 Thread Juergen Gross
This prepares support of larger scheduling granularities, e.g. core scheduling. While at it move sched_has_urgent_vcpu() from include/asm-x86/cpuidle.h into schedule.c removing the need for including sched-if.h in cpuidle.h and multiple other C sources. Signed-off-by: Juergen Gross --- V1: move

[Xen-devel] [PATCH 05/60] xen/sched: alloc struct sched_unit for each vcpu

2019-05-28 Thread Juergen Gross
Allocate a struct sched_unit for each vcpu. This removes the need to have it locally on the stack in schedule.c. Signed-off-by: Juergen Gross --- xen/common/schedule.c | 67 +++-- xen/include/xen/sched.h | 2 ++ 2 files changed, 33 insertions

[Xen-devel] [PATCH 09/60] xen/sched: let pick_cpu return a scheduler resource

2019-05-28 Thread Juergen Gross
Instead of returning a physical cpu number let pick_cpu() return a scheduler resource instead. Rename pick_cpu() to pick_resource() to reflect that change. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 12 ++-- xen/common/sched_credit.c| 16 xen

[Xen-devel] [PATCH 15/60] xen/sched: add domain pointer to struct sched_unit

2019-05-28 Thread Juergen Gross
Add a pointer to the domain to struct sched_unit in order to avoid having to dereference the vcpu pointer of struct sched_unit to find the related domain. Signed-off-by: Juergen Gross --- xen/common/schedule.c | 3 ++- xen/include/xen/sched.h | 1 + 2 files changed, 3 insertions(+), 1

[Xen-devel] [PATCH 07/60] xen/sched: build a linked list of struct sched_unit

2019-05-28 Thread Juergen Gross
for_each_sched_unit_vcpu() which will iterate over all vcpus if a sched_unit (right now only one). This will be needed later for larger scheduling granularity (e.g. cores). Signed-off-by: Juergen Gross --- xen/common/schedule.c | 56 ++--- xen/include

[Xen-devel] [PATCH 12/60] xen/sched: switch vcpu_schedule_lock to unit_schedule_lock

2019-05-28 Thread Juergen Gross
Rename vcpu_schedule_[un]lock[_irq]() to unit_schedule_[un]lock[_irq]() and let it take a sched_unit pointer instead of a vcpu pointer as parameter. Signed-off-by: Juergen Gross --- xen/common/sched_credit.c | 17 xen/common/sched_credit2.c | 40

[Xen-devel] [PATCH 33/60] xen/sched: Change vcpu_migrate_*() to operate on schedule unit

2019-05-28 Thread Juergen Gross
switched to schedule unit, too. Signed-off-by: Juergen Gross --- xen/common/schedule.c | 102 +- 1 file changed, 59 insertions(+), 43 deletions(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 12f9852786..8121da15c6 100644 --- a/xen

[Xen-devel] [PATCH 01/60] xen/sched: only allow schedulers with all mandatory functions available

2019-05-28 Thread Juergen Gross
Some functions of struct scheduler are mandatory. Test those in the scheduler initialization loop to be present and drop schedulers not complying. Signed-off-by: Juergen Gross --- V1: new patch --- xen/common/schedule.c | 26 +- 1 file changed, 25 insertions(+), 1

[Xen-devel] [PATCH 39/60] x86: optimize loading of GDT at context switch

2019-05-28 Thread Juergen Gross
Instead of dynamically decide whether the previous vcpu was using full or default GDT just add a percpu variable for that purpose. This at once removes the need for testing vcpu_ids to differ twice. Cache the need_full_gdt(nd) value in a local variable. Signed-off-by: Juergen Gross Reviewed-by

[Xen-devel] [PATCH 57/60] xen/sched: support multiple cpus per scheduling resource

2019-05-28 Thread Juergen Gross
Prepare supporting multiple cpus per scheduling resource by allocating the cpumask per resource dynamically. Modify sched_res_mask to have only one bit per scheduling resource set. Signed-off-by: Juergen Gross --- V1: new patch (carved out from other patch) --- xen/common/schedule.c | 16

[Xen-devel] [PATCH 26/60] xen: let vcpu_create() select processor

2019-05-28 Thread Juergen Gross
mains will have initially all nodes set, so this is no different behavior compared to today. To be able to use const struct domain * make cpupool_domain_cpumask() take a const domain pointer, too. Signed-off-by: Juergen Gross Acked-by: Andrew Cooper --- RFC V2: add ASSERT(), modify error messa

[Xen-devel] [PATCH 08/60] xen/sched: introduce struct sched_resource

2019-05-28 Thread Juergen Gross
core or socket only. Signed-off-by: Juergen Gross --- V1: add accessor functions --- xen/common/sched_credit.c | 2 ++ xen/common/sched_credit2.c | 7 +++ xen/common/sched_null.c| 3 +++ xen/common/sched_rt.c | 2 ++ xen/common/schedule.c | 15 +++ xen/include/xen

[Xen-devel] [PATCH 14/60] xen/sched: add scheduler helpers hiding vcpu

2019-05-28 Thread Juergen Gross
}_pause_flags[_atomic]() to modify pause_flags of the associated vcpu(s) - sched_idle_unit() to get the sched_unit pointer of the idle vcpu of a specific physical cpu Signed-off-by: Juergen Gross --- xen/common/sched_credit.c | 3 +-- xen/common/schedule.c | 19 xen/include

[Xen-devel] [PATCH 28/60] xen/sched: switch schedule() from vcpus to sched_units

2019-05-28 Thread Juergen Gross
Use sched_units instead of vcpus in schedule(). This includes the introduction of sched_unit_runstate_change() as a replacement of vcpu_runstate_change() in schedule(). Signed-off-by: Juergen Gross --- xen/common/schedule.c | 70 +-- 1 file

[Xen-devel] [PATCH 21/60] xen/sched: make rt scheduler vcpu agnostic.

2019-05-28 Thread Juergen Gross
Switch rt scheduler completely from vcpu to sched_unit usage. Signed-off-by: Juergen Gross --- xen/common/sched_rt.c | 356 -- 1 file changed, 174 insertions(+), 182 deletions(-) diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c index

[Xen-devel] [PATCH 24/60] xen/sched: make arinc653 scheduler vcpu agnostic.

2019-05-28 Thread Juergen Gross
Switch arinc653 scheduler completely from vcpu to sched_unit usage. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 208 +--- 1 file changed, 101 insertions(+), 107 deletions(-) diff --git a/xen/common/sched_arinc653.c b/xen/common

[Xen-devel] [PATCH 31/60] xen/sched: add runstate counters to struct sched_unit

2019-05-28 Thread Juergen Gross
Add counters to struct sched_unit summing up runstates of associated vcpus. Signed-off-by: Juergen Gross --- RFC V2: add counters for each possible runstate --- xen/common/schedule.c | 5 + xen/include/xen/sched.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/xen/common

[Xen-devel] [PATCH 18/60] xen/sched: switch struct task_slice from vcpu to sched_unit

2019-05-28 Thread Juergen Gross
Let the schedulers put a sched_unit pointer into struct task_slice instead of a vcpu pointer. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 8 xen/common/sched_credit.c | 4 ++-- xen/common/sched_credit2.c | 4 ++-- xen/common/sched_null.c | 12

[Xen-devel] [PATCH 29/60] xen/sched: switch sched_move_irqs() to take sched_unit as parameter

2019-05-28 Thread Juergen Gross
sched_move_irqs() should work on a sched_unit as that is the unit moved between cpus. Rename the current function to vcpu_move_irqs() as it is still needed in schedule(). Signed-off-by: Juergen Gross --- xen/common/schedule.c | 18 +- 1 file changed, 13 insertions(+), 5

[Xen-devel] [PATCH 19/60] xen/sched: add is_running indicator to struct sched_unit

2019-05-28 Thread Juergen Gross
pdated whenever the is_running indicator is changed. Use that new field in the schedulers instead of the similar vcpu field. Signed-off-by: Juergen Gross --- RFC V2: fix arm build, don't drop v->is_running --- xen/common/sched_credit.c | 12 +++- xen/common/sched_

[Xen-devel] [PATCH 06/60] xen/sched: move per-vcpu scheduler private data pointer to sched_unit

2019-05-28 Thread Juergen Gross
This prepares making the different schedulers vcpu agnostic. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 4 ++-- xen/common/sched_credit.c | 6 +++--- xen/common/sched_credit2.c | 10 +- xen/common/sched_null.c | 4 ++-- xen/common/sched_rt.c | 4

[Xen-devel] [PATCH 34/60] xen/sched: move struct task_slice into struct sched_unit

2019-05-28 Thread Juergen Gross
. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 20 +++- xen/common/sched_credit.c | 25 +++-- xen/common/sched_credit2.c | 21 + xen/common/sched_null.c | 26 -- xen/common/sched_rt.c | 22

[Xen-devel] [PATCH 37/60] xen/sched: add support for multiple vcpus per sched unit where missing

2019-05-28 Thread Juergen Gross
In several places there is support for multiple vcpus per sched unit missing. Add that missing support (with the exception of initial allocation) and missing helpers for that. Signed-off-by: Juergen Gross --- RFC V2: fix vcpu_runstate_helper() V1: add special handling for idle unit in

[Xen-devel] [PATCH 17/60] xen/sched: rename scheduler related perf counters

2019-05-28 Thread Juergen Gross
Rename the scheduler related perf counters from vcpu* to unit* where appropriate. Signed-off-by: Juergen Gross --- xen/common/sched_credit.c| 32 xen/common/sched_credit2.c | 18 +- xen/common/sched_null.c | 18 +- xen

[Xen-devel] [PATCH 30/60] xen: switch from for_each_vcpu() to for_each_sched_unit()

2019-05-28 Thread Juergen Gross
Where appropriate switch from for_each_vcpu() to for_each_sched_unit() in order to prepare core scheduling. Signed-off-by: Juergen Gross --- xen/common/domain.c | 9 ++--- xen/common/schedule.c | 109 ++ 2 files changed, 60 insertions(+), 58

[Xen-devel] [PATCH 02/60] xen/sched: add inline wrappers for calling per-scheduler functions

2019-05-28 Thread Juergen Gross
Instead of using the SCHED_OP() macro to call the different scheduler specific functions add inline wrappers for that purpose. Signed-off-by: Juergen Gross --- RFC V2: new patch (Andrew Cooper) V1: use conditional operator (Jan Beulich, Dario Faggioli) drop no longer needed ASSERT()s

<    1   2   3   4   5   6   7   8   9   10   >