On 26.07.19 13:50, Andrew Cooper wrote:
On 26/07/2019 12:42, Juergen Gross wrote:
On 26.07.19 13:35, Jan Beulich wrote:
On 26.07.2019 11:46, Andrew Cooper wrote:
On 24/07/2019 12:26, Juergen Gross wrote:
@@ -182,30 +178,24 @@ static void __prepare_to_wait(struct
waitqueue_vcpu *wqv
Continuing on the stack saved by __prepare_to_wait() on the wrong cpu
is rather dangerous.
Instead of doing so just call the scheduler again as it already is
happening in the similar case in __prepare_to_wait() when doing the
setjmp() would be wrong.
Signed-off-by: Juergen Gross
---
xen/common
On 29.07.19 10:34, Andrew Cooper wrote:
On 29/07/2019 05:36, Juergen Gross wrote:
Continuing on the stack saved by __prepare_to_wait() on the wrong cpu
is rather dangerous.
Instead of doing so just call the scheduler again as it already is
happening in the similar case in __prepare_to_wait
On 28.07.19 10:41, Juergen Gross wrote:
debugtrace is normally writing trace entries into a single trace
buffer. There are cases where this is not optimal, e.g. when hunting
a bug which requires writing lots of trace entries and one cpu is
stuck. This will result in other cpus filling the trace
On 29.07.19 13:53, Dario Faggioli wrote:
On Fri, 2019-07-26 at 14:14 +0200, Juergen Gross wrote:
On 26.07.19 13:56, Dario Faggioli wrote:
On Fri, 2019-07-26 at 13:37 +0300, Andrii Anisov wrote:
- How to avoid the absolute top priority of tasklets (what is
obeyed
by all
schedulers so
On 29.07.19 14:45, Jan Beulich wrote:
On 28.07.2019 10:40, Juergen Gross wrote:
-#endif /* !CONFIG_DEBUG_TRACE */
-
-
/*
* **
* *** Debugging/tracing/error-report ***
... what about this one
On 29.07.19 16:00, Jan Beulich wrote:
On 29.07.2019 15:30, Juergen Gross wrote:
On 29.07.19 14:45, Jan Beulich wrote:
On 28.07.2019 10:40, Juergen Gross wrote:
-#endif /* !CONFIG_DEBUG_TRACE
On 29.07.19 20:03, Andrew Cooper wrote:
On 29/07/2019 14:54, Jan Beulich wrote:
On 29.07.2019 15:23, Andrew Cooper wrote:
On 29/07/2019 14:00, Jan Beulich wrote:
On 26.07.2019 23:08, Andrew Cooper wrote:
--- a/xen/include/xen/percpu.h
+++ b/xen/include/xen/percpu.h
@@ -3,6 +3,12 @@
#
hen Xen is enabled,
as suggested by Juergen Gross and Boris Ostrovsky.
Signed-off-by: Arnd Bergmann
Pushed to xen/tip.git for-linus-5.3a
Juergen
___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
On 30.07.19 20:34, Souptick Joarder wrote:
'commit df9bde015a72 ("xen/gntdev.c: convert to use vm_map_pages()")'
breaks gntdev driver. If vma->vm_pgoff > 0, vm_map_pages()
will:
- use map->pages starting at vma->vm_pgoff instead of 0
- verify map->count against vma_pages()+vma->vm_pgoff inste
On 01.08.19 11:55, Anthony PERARD wrote:
On Wed, Jul 31, 2019 at 05:57:32PM +, Volodymyr Babchuk wrote:
Lars Kurth writes:
Ultimately we have to make some trade-offs as to what is more important:
a) automatic style checking - which means "common sense" can't be formalised
and there will be
As a preparation for per-cpu buffers do a little refactoring of the
debugtrace data: put the needed buffer admin data into the buffer as
it will be needed for each buffer.
While at it switch debugtrace_send_to_console and debugtrace_used to
bool and delete an empty line.
Signed-off-by: Juergen
Instead of living in drivers/char/console.c move the debugtrace
related coding to a new file common/debugtrace.c
No functional change, code movement only.
Signed-off-by: Juergen Gross
---
xen/common/Makefile| 1 +
xen/common/debugtrace.c| 177
Another debugtrace enhancement I needed for core scheduling debugging,
plus some cleanup.
Changes in V2:
- added new patch 1 (preparing the move of debugtrace coding)
- patch 4 (v1 patch 3): avoid leaking buffer
Juergen Gross (4):
xen: use common output function in debugtrace
xen: move
unction to accept size modifiers
(e.g. 4M or 1G).
Printing out the trace entries is done for each buffer in order to
minimize the effort needed during printing. As each entry is prefixed
with its sequence number sorting the entries can easily be done when
analyzing them.
Signed-off-by: Juergen Gro
functionality to an own source
file rename sercon_puts() to console_serial_puts() and make it globally
visible.
Signed-off-by: Juergen Gross
---
xen/drivers/char/console.c | 16
xen/include/xen/console.h | 3 +++
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a
On 01.08.19 14:16, Viktor Mitin wrote:
On Thu, Aug 1, 2019 at 10:40 AM Jan Beulich wrote:
On 31.07.2019 18:20, Viktor Mitin wrote:
How all those projects live without this issue?
Perhaps they don't care? I do.
What is the reason not to fix 'diff -p'? Is it not possible at all?
I have no
Dario Faggioli
* Core aware scheduling for credit2 (RFC v1)
- Dario Faggioli
* Core scheduling (v1)
- Juergen Gross
* Switch to use domheap page for page table (RFC v1)
- Wei Liu
=== x86 ===
* PV-IOMMU (v7)
- Paul Durrant
* HVM guest CPU topology support (RFC)
- Chao Gao
*
fc1d8e7cca2d
("mm: introduce put_user_page*(), placeholder versions").
Cc: Boris Ostrovsky
Cc: Juergen Gross
Cc: xen-devel@lists.xenproject.org
Signed-off-by: John Hubbard
---
drivers/xen/gntdev.c | 5 +
drivers/xen/privcmd.c | 7 +--
2 files changed, 2 insertions(+), 10 deletion
On 02.08.19 04:15, Andy Smith wrote:
Hi,
On Mon, Jul 22, 2019 at 01:06:03PM +0100, Andrew Cooper wrote:
On 22/07/2019 10:16, Jan Beulich wrote:
On 21.07.2019 22:06, Andy Smith wrote:
(XEN) Adding cpu 1 to runqueue 0
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still
On 02.08.19 07:48, John Hubbard wrote:
On 8/1/19 9:36 PM, Juergen Gross wrote:
On 02.08.19 04:19, john.hubb...@gmail.com wrote:
From: John Hubbard
...
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index 2f5ce7230a43..29e461dbee2d 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers
On 02.08.19 10:38, Viktor Mitin wrote:
On Thu, Aug 1, 2019 at 3:50 PM Juergen Gross wrote:
On 01.08.19 14:16, Viktor Mitin wrote:
On Thu, Aug 1, 2019 at 10:40 AM Jan Beulich wrote:
On 31.07.2019 18:20, Viktor Mitin wrote:
How all those projects live without this issue?
Perhaps they
longer happen, as parking the not
to be started threads is done before.
Juergen Gross (3):
xen/sched: populate cpupool0 only after all cpus are up
xen/sched: remove cpu from pool0 before removing it
xen/sched: add minimalistic idle scheduler for free cpus
xen/common/cpupool.c | 194
so we need to switch from spinlock_irq to spinlock_irqsave.
Signed-off-by: Juergen Gross
---
xen/common/cpupool.c | 176 +++--
xen/common/schedule.c | 27 ---
xen/include/xen/sched-if.h | 2 +
3 files changed, 128 insertions(+), 77
moving cpus to and from cpupools a lot.
This new scheduler will just use a common lock for all free cpus.
As this new scheduler is not user selectable don't register it as an
official scheduler, but just include it in schedule.c.
Signed-off-by: Juergen Gross
---
xen/common/sched_credit.c
assigning the cpus. Initialize free cpus with all
online cpus at that time in order to be able to add the cpu notifier
late, too.
Signed-off-by: Juergen Gross
---
V1: new patch
---
xen/common/cpupool.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/xen
+++
7 files changed, 56 insertions(+), 57 deletions(-)
Arnd Bergmann (1):
xen: avoid link error on ARM
Juergen Gross (3):
xen/swiotlb: fix condition for calling xen_destroy_contiguous_region()
xen/swiotlb: simplify range_straddles_page_boundary()
xen/swiotlb: remember
fc1d8e7cca2d
("mm: introduce put_user_page*(), placeholder versions").
This also handles pages[i] == NULL cases, thanks to an approach
that is actually written by Juergen Gross.
Signed-off-by: Juergen Gross
Signed-off-by: John Hubbard
Cc: Boris Ostrovsky
Cc: xen-devel@lists.xenproject.o
On 05.08.19 17:07, George Dunlap wrote:
On 4/4/19 2:35 PM, Juergen Gross wrote:
On 04/04/2019 15:27, Wei Liu wrote:
On Fri, Mar 15, 2019 at 05:29:28PM +0100, Juergen Gross wrote:
On 15/03/2019 16:55, Andrew Cooper wrote:
On 14/03/2019 11:59, Juergen Gross wrote:
@@ -1100,6 +1100,20
add_sized() should use an atomic update of the memory word, as it is
used by spin_unlock().
With ticket locks unlocking needs to be atomic in order to avoid very
rare races when someone tries to get the lock while the lock holder
is just releasing it.
Signed-off-by: Juergen Gross
---
xen
On 06.08.19 10:26, Jan Beulich wrote:
On 06.08.2019 09:00, Juergen Gross wrote:
add_sized() should use an atomic update of the memory word, as it is
used by spin_unlock().
With ticket locks unlocking needs to be atomic in order to avoid very
rare races when someone tries to get the lock while
be atomic, too, as otherwise the unlock might not write back the
correct data.
Signed-off-by: Juergen Gross
---
xen/include/asm-x86/atomic.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/include/asm-x86/atomic.h b/xen/include/asm-x86/atomic.h
index 682bcf91b1
On 07.08.19 11:10, Jan Beulich wrote:
On 07.08.2019 09:32, Juergen Gross wrote:
add_sized() should use an atomic update of the memory word, as it is
used by spin_unlock().
Ticket locks are using a read-modify-write operation on parts of the
lockword for unlocking, while trying to lock is done
csched2_deinit() is leaking the run-queue memory.
Signed-off-by: Juergen Gross
---
xen/common/sched_credit2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index 6fff210ca6..6b77da7476 100644
--- a/xen/common/sched_credit2.c
+++ b
config option select SPINLOCK_DEBUG.
As printing the lock profile data will make use of locking, too, we
need to disable spinlock debugging before calling
spinlock_profile_printall() from panic().
While at it remove a superfluous #ifdef CONFIG_LOCK_PROFILE.
Signed-off-by: Juergen Gross
---
xen
. when a NMI
watchdog is triggering a crash.
Juergen Gross (4):
xen/spinlocks: in debug builds store cpu holding the lock
xen: add new CONFIG_SPINLOCK_DEBUG option
xen: print lock profile info in panic()
xen: modify lock profiling interface
tools/libxc/xc_misc.c | 1 +
tools/misc
Add the cpu currently holding the lock to struct lock_debug. This makes
analysis of locking errors easier and it can be tested whether the
correct cpu is releasing a lock again.
Signed-off-by: Juergen Gross
---
xen/common/spinlock.c | 31 +--
xen/include/xen
Instead of enabling spinlock debugging for debug builds only add a
dedicated Kconfig option for that purpose which defaults to DEBUG.
Signed-off-by: Juergen Gross
---
xen/Kconfig.debug | 7 +++
xen/common/spinlock.c | 4 ++--
xen/include/xen/spinlock.h | 2 +-
3 files changed
ned-off-by: Juergen Gross
---
tools/libxc/xc_misc.c | 1 +
tools/misc/xenlockprof.c| 17 ++---
xen/common/domain.c | 4 +-
xen/common/spinlock.c | 92 +++--
xen/include/public/sysctl.h | 11 ++
xen/include/xen/spinlo
On 07.08.19 19:05, Andrew Cooper wrote:
On 07/08/2019 15:31, Juergen Gross wrote:
Add the cpu currently holding the lock to struct lock_debug. This makes
analysis of locking errors easier and it can be tested whether the
correct cpu is releasing a lock again.
Signed-off-by: Juergen Gross
On 07.08.19 19:17, Andrew Cooper wrote:
On 07/08/2019 15:31, Juergen Gross wrote:
Instead of enabling spinlock debugging for debug builds only add a
dedicated Kconfig option for that purpose which defaults to DEBUG.
Signed-off-by: Juergen Gross
---
xen/Kconfig.debug | 7
On 07.08.19 20:11, Andrew Cooper wrote:
On 07/08/2019 15:31, Juergen Gross wrote:
While hunting a locking problem in my core scheduling series I have
added some debugging aids to spinlock handling making it easier to
find the root cause for the problem.
Making use of the already lock profiling
On 08.08.19 08:34, Jan Beulich wrote:
On 07.08.2019 16:31, Juergen Gross wrote:
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -44,6 +44,13 @@ config COVERAGE
If unsure, say N here.
+config SPINLOCK_DEBUG
+ bool "Spinlock debugging"
+ default DEBUG
+
On 08.08.19 08:58, Jan Beulich wrote:
On 07.08.2019 16:31, Juergen Gross wrote:
--- a/xen/common/spinlock.c
+++ b/xen/common/spinlock.c
@@ -13,9 +13,9 @@
static atomic_t spin_debug __read_mostly = ATOMIC_INIT(0);
-static void check_lock(struct lock_debug *debug)
+static void
On 08.08.19 09:32, Jan Beulich wrote:
On 07.08.2019 16:31, Juergen Gross wrote:
@@ -463,31 +464,67 @@ int spinlock_profile_control(struct
xen_sysctl_lockprof_op *pc)
return rc;
}
-void _lock_profile_register_struct(
-int32_t type, struct lock_profile_qhead *qhead, int32_t
On 08.08.19 09:35, Jan Beulich wrote:
On 08.08.2019 09:23, Juergen Gross wrote:
On 08.08.19 08:34, Jan Beulich wrote:
On 07.08.2019 16:31, Juergen Gross wrote:
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -44,6 +44,13 @@ config COVERAGE
If unsure, say N here.
+config
On 08.08.19 09:09, Jan Beulich wrote:
On 07.08.2019 16:31, Juergen Gross wrote:
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -53,6 +53,7 @@ config SPINLOCK_DEBUG
config LOCK_PROFILE
bool "Lock Profiling"
+ select SPINLOCK_DEBUG
---help---
On 08.08.19 10:33, Andrew Cooper wrote:
On 08/08/2019 05:50, Juergen Gross wrote:
On 07.08.19 20:11, Andrew Cooper wrote:
Its not exactly the easiest to dump to follow.
First of all - I don't see why the hold/block time are printed like
that. It
might be a holdover from the 32bit
On 08.08.19 12:28, Julien Grall wrote:
On 08/08/2019 08:51, Juergen Gross wrote:
On 08.08.19 08:58, Jan Beulich wrote:
On 07.08.2019 16:31, Juergen Gross wrote:
Do we have an implied assumption somewhere that unsigned short is
exactly 16 bits wide? I think "val" wants to be uint16_
On 08.08.19 12:20, Andrew Cooper wrote:
On 08/08/2019 10:36, Juergen Gross wrote:
On 08.08.19 10:33, Andrew Cooper wrote:
On 08/08/2019 05:50, Juergen Gross wrote:
On 07.08.19 20:11, Andrew Cooper wrote:
Its not exactly the easiest to dump to follow.
First of all - I don't see wh
On 08.08.19 14:18, Jan Beulich wrote:
On 08.08.2019 13:53, Juergen Gross wrote:
On 08.08.19 12:28, Julien Grall wrote:
On 08/08/2019 08:51, Juergen Gross wrote:
On 08.08.19 08:58, Jan Beulich wrote:
On 07.08.2019 16:31, Juergen Gross wrote:
Do we have an implied assumption somewhere that
On 08.08.19 11:36, Juergen Gross wrote:
On 08.08.19 10:33, Andrew Cooper wrote:
On 08/08/2019 05:50, Juergen Gross wrote:
On 07.08.19 20:11, Andrew Cooper wrote:
For sanity sake, we should enforce unique naming of any lock
registered for
profiling.
This would be every lock inited via
. when a NMI
watchdog is triggering a crash.
Changes in V2:
- multiple comments addressed
- added patch 5
Juergen Gross (5):
xen/spinlocks: in debug builds store cpu holding the lock
xen: add new CONFIG_DEBUG_LOCKS option
xen: print lock profile info in panic()
xen: modify lock profiling
Instead of enabling debugging for debug builds only add a dedicated
Kconfig option for that purpose which defaults to DEBUG.
Signed-off-by: Juergen Gross
---
V2:
- rename to CONFIG_DEBUG_LOCKS (Jan Beulich)
---
xen/Kconfig.debug | 7 +++
xen/common/spinlock.c | 4 ++--
xen
Add the cpu currently holding the lock to struct lock_debug. This makes
analysis of locking errors easier and it can be tested whether the
correct cpu is releasing a lock again.
Signed-off-by: Juergen Gross
---
V2: adjust types (Jan Beulich)
---
xen/common/spinlock.c | 33
In order to have unique names when doing lock profiling several local
locks "lock" need to be renamed.
Signed-off-by: Juergen Gross
---
xen/arch/x86/irq.c | 6 +++---
xen/arch/x86/time.c| 6 +++---
xen/common/keyhandler.c| 6 +++---
xen/common/perfc.c | 6 +
ned-off-by: Juergen Gross
---
V2:
- add comment about memory allocation needs (Jan Beulich)
- check success of memory allocation (Jan Beulich)
---
tools/libxc/xc_misc.c | 1 +
tools/misc/xenlockprof.c| 17 ++--
xen/common/domain.c | 4 +-
xen/common/spinlock.c
#ifdef CONFIG_LOCK_PROFILE and rename
CONFIG_LOCK_PROFILE to CONFIG_DEBUG_LOCK_PROFILE.
Also move the .lockprofile.data section to init area in linker scripts
as the data is no longer needed after boot.
Signed-off-by: Juergen Gross
---
V2:
- rename CONFIG_LOCK_PROFILE to CONFIG_DEBUG_LOCK_PROFILE
On 02.08.19 15:07, Juergen Gross wrote:
These three patches have been carved out from my core scheduling series
as they are sufficiently independent to be applied even without the big
series.
Without this little series there are messages like the following to be
seen on the console when booting
We'll need a way to free a sched_unit structure without side effects
in a later patch.
Signed-off-by: Juergen Gross
---
RFC V2: new patch, carved out from RFC V1 patch 49
---
xen/common/schedule.c | 38 +-
1 file changed, 21 insertions(+), 17 dele
vcpu we
can just do that. In case it is for a foreign vcpu we should pause it
for that purpose like we do for all other vcpu state modifications.
Rename the function to vcpu_set_periodic_timer() as this now reflects
the functionality.
Signed-off-by: Juergen Gross
---
V1: latch NOW() only after
ff-by: Juergen Gross
---
RFC V2:
- new patch (Andrew Cooper)
V1:
- use urgent_count to select correct idle routine (Jan Beulich)
V2:
- set vcpu->is_running in context_saved()
- introduce reset_stack_and_jump_nolp() (Jan Beulich)
- readd scrubbing (Jan Beulich, Andrew Cooper)
- get_cpu_current
In preparation of core scheduling let the percpu pointer
schedule_data.curr point to a strct sched_unit instead of the related
vcpu. At the same time rename the per-vcpu scheduler specific structs
to per-unit ones.
Signed-off-by: Juergen Gross
Reviewed-by: Dario Faggioli
---
xen/common
vidual patches)
Changes in RFC V2:
- 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 (48):
xen/sched: use new sched_unit instead of vcpu in scheduler interfaces
xen/sched: move pe
processor of an unit
- sched_{set|clear}_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
-off-by: Juergen Gross
---
RFC V2: new patch (carved out from RFC V1 patch 49)
---
xen/common/schedule.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index c6cd357bc8..13d3392640 100644
--- a/xen/common/schedule.c
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_
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
f the domain's vcpu linked
list, which isn't the case.
Signed-off-by: Juergen Gross
---
xen/common/schedule.c | 85 +++
1 file changed, 65 insertions(+), 20 deletions(-)
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index bbc9eb9
priority than a normal schedule
event.
Use the same mechanism when waking up a vcpu of a currently active
unit.
While at it make vcpu_sleep_nosync_locked() static as it is used in
schedule.c only.
Signed-off-by: Juergen Gross
---
RFC V2: add vcpu_sleep() handling and force_context_switch flag
V2: fix
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
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
core or socket only.
Signed-off-by: Juergen Gross
---
V1:
- add accessor functions
- use DEFINE_PER_CPU_READ_MOSTLY (Dario Faggioli)
---
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
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
rename local functions switched to sched_unit, too.
For now this new struct will contain a domain, a vcpu pointer and a
unit_id only and is allocated at vcpu creation time.
Signed-off-by: Juergen Gross
Reviewed-by: Dario Faggioli
---
RFC V2:
- move definition of struct sched_unit to sched.h
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
vcpu_sync_execstate() for each
vcpu of the unit when changing processors.
vcpu_move_locked() is switched to schedule unit, too.
Signed-off-by: Juergen Gross
---
xen/common/schedule.c | 106 ++
1 file changed, 63 insertions(+), 43 deletions(-)
diff
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
Reviewed-by: Dario Faggioli
---
xen/common/sched_arinc653.c | 12 ++--
xen/common/sched_credit.c
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
Acked-by
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
Where appropriate switch from for_each_vcpu() to for_each_sched_unit()
in order to prepare core scheduling.
As it is beneficial once here and for sure in future add a
unit_scheduler() helper and let vcpu_scheduler() use it.
Signed-off-by: Juergen Gross
---
V2:
- handle affinity_broken correctly
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
This prepares making the different schedulers vcpu agnostic.
Note that some scheduler specific accessor function are misnamed after
this patch. This will be corrected in later patches.
Signed-off-by: Juergen Gross
---
xen/common/sched_arinc653.c | 4 ++--
xen/common/sched_credit.c | 6
Switch credit scheduler completely from vcpu to sched_unit usage.
Signed-off-by: Juergen Gross
---
xen/common/sched_credit.c | 503 +++---
1 file changed, 250 insertions(+), 253 deletions(-)
diff --git a/xen/common/sched_credit.c b/xen/common
.
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 | 29 ++---
xen/common/sched_rt.c | 22
The credit scheduler calls vcpu_pause_nosync() and vcpu_unpause()
today. Add sched_unit_pause_nosync() and sched_unit_unpause() to
perform the same operations on scheduler units instead.
Signed-off-by: Juergen Gross
---
xen/common/sched_credit.c | 6 +++---
xen/include/xen/sched-if.h | 10
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 | 68 +--
1 file
flag must be kept per vcpu as it is related to
guest actions on specific vcpus.
Signed-off-by: Juergen Gross
---
V2:
- move affinity_broken back to struct vcpu (Jan Beulich)
- print affinities only once per unit (Jan Beulich)
---
xen/common/domain.c| 15 ++--
xen/common/domctl.c
selecting the vcpu to switch to, as we already know which vcpu we
want to run. This has the other advantage not to loose any other
concurrent SCHEDULE_SOFTIRQ events.
Signed-off-by: Juergen Gross
---
RFC V2:
- move syncing after context_switch() to schedule.c
V2:
- don't run tasklets directly
populating the cpupool with cpus.
This will make on- and offlining of cpus much easier and avoids
writing code which would needed to be thrown away later.
Signed-off-by: Juergen Gross
---
V1: new patch
---
xen/common/cpupool.c | 2 ++
xen/common/schedule.c | 23
Having a pointer to struct cpupool in struct sched_resource instead
of per cpu is enough.
Signed-off-by: Juergen Gross
---
V1: new patch
---
xen/common/cpupool.c | 4 +---
xen/common/sched_credit.c | 2 +-
xen/common/sched_rt.c | 2 +-
xen/common/schedule.c | 8
xen
When core or socket scheduling are active enabling or disabling smt is
not possible as that would require a major host reconfiguration.
Add a bool sched_disable_smt_switching which will be set for core or
socket scheduling.
Signed-off-by: Juergen Gross
---
V1:
- new patch
V2:
- EBUSY as return
Switch null scheduler completely from vcpu to sched_unit usage.
Signed-off-by: Juergen Gross
---
xen/common/sched_null.c | 333
1 file changed, 165 insertions(+), 168 deletions(-)
diff --git a/xen/common/sched_null.c b/xen/common/sched_null.c
for_each_sched_unit_vcpu() which
will iterate over all vcpus of a sched_unit (right now only one). This
will be needed later for larger scheduling granularity (e.g. cores).
Signed-off-by: Juergen Gross
---
V2:
- add comment (Dario Faggioli)
---
xen/common/schedule.c | 60
softirq handler
with a dummy scheduling routine only enabling tasklets to run.
Signed-off-by: Juergen Gross
---
V2: new patch
---
xen/arch/x86/acpi/power.c | 4
xen/common/schedule.c | 31 +--
xen/include/xen/sched.h | 2 ++
3 files changed, 35 insertions
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
pdata and vdata and loop over
those where appropriate.
Additionally the scheduling resource(s) must either be merged or
split.
Signed-off-by: Juergen Gross
---
xen/common/cpupool.c | 18 ++--
xen/common/schedule.c | 226 +++---
2 files changed, 204
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
With core scheduling active it is necessary to move multiple cpus at
the same time to or from a cpupool in order to avoid split scheduling
resources in between.
Signed-off-by: Juergen Gross
---
V1: new patch
---
xen/common/cpupool.c | 100 +
xen
cpupool_domain_cpumask() is used by scheduling to select cpus or to
iterate over cpus. In order to support scheduling units spanning
multiple cpus let cpupool_domain_cpumask() return a cpumask with only
one bit set per scheduling resource.
Signed-off-by: Juergen Gross
---
xen/common/cpupool.c
701 - 800 of 7295 matches
Mail list logo