[PATCH V3 3/3] vdpa_sim: flush workers on suspend

2024-05-20 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns. Add a lock to enforce ordering between clearing running, flushing, and posting new work in vdpasim_kick_vq. It must be a spin lock because vdpasim_kick_vq may be reached va eventfd_write. Signed-off-by: Steve Sistare --- drivers

[PATCH V3 2/3] vduse: suspend

2024-05-20 Thread Steve Sistare
Support the suspend operation. There is little to do, except flush to guarantee no workers are running when suspend returns. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_user/vduse_dev.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/vdpa/vdpa_user

[PATCH V3 0/3] flush workers on suspend

2024-05-20 Thread Steve Sistare
uspend) - call vhost_dev_flush unconditionally in "vhost-vdpa: flush workers on suspend" Changes in v3: - rewrote vdpa_sim patch Steve Sistare (3): vhost-vdpa: flush workers on suspend vduse: suspend vdpa_sim: flush workers on suspend drivers/vdpa/vdpa_sim/vdpa_sim.c | 16

[PATCH V3 1/3] vhost-vdpa: flush workers on suspend

2024-05-20 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns. Fixes: f345a0143b4d ("vhost-vdpa: uAPI to suspend the device") Signed-off-by: Steve Sistare Acked-by: Eugenio PĂ©rez --- drivers/vhost/vdpa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/vhost/vdpa.c

[PATCH V2] vdpa: skip suspend/resume ops if not DRIVER_OK

2024-02-13 Thread Steve Sistare
If a vdpa device is not in state DRIVER_OK, then there is no driver state to preserve, so no need to call the suspend and resume driver ops. Suggested-by: Eugenio Perez Martin " Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH V2 2/3] vduse: suspend

2024-02-12 Thread Steve Sistare
Support the suspend operation. There is little to do, except flush to guarantee no workers are running when suspend returns. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_user/vduse_dev.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/vdpa/vdpa_user

[PATCH V2 1/3] vhost-vdpa: flush workers on suspend

2024-02-12 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index bc4a51e4638b..a3b986c24805 100644 --- a/drivers/vhost/vdpa.c +++ b

[PATCH V2 0/3] flush workers on suspend

2024-02-12 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns, for vdpa, vpa_sim, and vduse. (mlx5 already does so, via the path mlx5_vdpa_suspend -> unregister_link_notifier -> flush_workqueue.) Steve Sistare (3): vhost-vdpa: flush workers on suspend vduse: suspend vdpa_sim:

[PATCH V2 3/3] vdpa_sim: flush workers on suspend

2024-02-12 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index be2925d0d283

[PATCH V1] vdpa: suspend and resume require DRIVER_OK

2024-02-09 Thread Steve Sistare
Calling suspend or resume requires VIRTIO_CONFIG_S_DRIVER_OK, for all vdpa devices. Suggested-by: Eugenio Perez Martin " Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index bc4a51e

[PATCH V2] vdpa_sim: reset must not run

2024-02-09 Thread Steve Sistare
vdpasim_do_reset sets running to true, which is wrong, as it allows vdpasim_kick_vq to post work requests before the device has been configured. To fix, do not set running until VIRTIO_CONFIG_S_DRIVER_OK is set. Fixes: 0c89e2a3a9d0 ("vdpa_sim: Implement suspend vdpa op") Signed-off

[PATCH V1] vdpa_sim: reset must not run

2024-01-17 Thread Steve Sistare
vdpasim_do_reset sets running to true, which is wrong, as it allows vdpasim_kick_vq to post work requests before the device has been configured. To fix, do not set running until VIRTIO_CONFIG_S_FEATURES_OK is set. Fixes: 0c89e2a3a9d0 ("vdpa_sim: Implement suspend vdpa op") Signed-off

[RFC V1 12/13] vdpa_sim: new owner capability

2024-01-10 Thread Steve Sistare
The vdpa_sim device supports ownership transfer to a new process, so advertise VHOST_BACKEND_F_NEW_OWNER. User virtual addresses are used by the software iommu, so VHOST_IOTLB_REMAP is required after VHOST_NEW_OWNER, so advertise VHOST_BACKEND_F_IOTLB_REMAP. Signed-off-by: Steve Sistare

[RFC V1 13/13] vduse: new owner capability

2024-01-10 Thread Steve Sistare
The vduse device supports ownership transfer to a new process, so advertise VHOST_BACKEND_F_NEW_OWNER. User virtual addresses are used by the software iommu, so VHOST_IOTLB_REMAP is required after VHOST_NEW_OWNER, so advertise VHOST_BACKEND_F_IOTLB_REMAP. Signed-off-by: Steve Sistare

[RFC V1 07/13] vhost-vdpa: flush workers on suspend

2024-01-10 Thread Steve Sistare
in between. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 8fe1562d24af..9673e8e20d11 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -591,10 +591,14 @@ static long

[RFC V1 04/13] vhost-vdpa: VHOST_BACKEND_F_NEW_OWNER

2024-01-10 Thread Steve Sistare
Add the VHOST_BACKEND_F_NEW_OWNER backend capability, which indicates that VHOST_NEW_OWNER is supported. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 7 ++- include/uapi/linux/vhost_types.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers

[RFC V1 11/13] vdpa/mlx5: new owner capability

2024-01-10 Thread Steve Sistare
-by: Steve Sistare --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 26ba7da6b410..26f24fb0e160 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5

[RFC V1 10/13] vdpa_sim: flush workers on suspend

2024-01-10 Thread Steve Sistare
in between. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index 6304cb0b4770..8734834983cb 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b

[RFC V1 09/13] vdpa_sim: reset must not run

2024-01-10 Thread Steve Sistare
vdpasim_do_reset sets running to true, which is wrong, as it allows vdpasim_kick_vq to post work requests before the device has been configured. To fix, do not set running until VIRTIO_CONFIG_S_FEATURES_OK is set. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- 1

[RFC V1 05/13] vhost-vdpa: VHOST_IOTLB_REMAP

2024-01-10 Thread Steve Sistare
mapped. The user must suspend the device before the old address is invalidated, and cannot resume it until after VHOST_IOTLB_REMAP is called, but this requirement is not enforced by the API. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 34

[RFC V1 06/13] vhost-vdpa: VHOST_BACKEND_F_IOTLB_REMAP

2024-01-10 Thread Steve Sistare
the feature during negotiation does not negate this requirement. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 8 +++- include/uapi/linux/vhost_types.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index

[RFC V1 08/13] vduse: flush workers on suspend

2024-01-10 Thread Steve Sistare
in between. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_user/vduse_dev.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c index 0ddd4b8abecb..6b25457a037d 100644 --- a/drivers/vdpa/vdpa_user

[RFC V1 03/13] vhost-vdpa: VHOST_NEW_OWNER

2024-01-10 Thread Steve Sistare
Add an ioctl to transfer file descriptor ownership and pinned memory accounting from one process to another. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 37 + drivers/vhost/vhost.c | 15 +++ drivers/vhost/vhost.h | 1

[RFC V1 00/13] vdpa live update

2024-01-10 Thread Steve Sistare
write(fd, {VHOST_IOTLB_REMAP, new_addr}) ioctl(fd, VHOST_VDPA_SET_STATUS, ACKNOWLEDGE | DRIVER | FEATURES_OK | DRIVER_OK) Steve Sistare (13): vhost-vdpa: count pinned memory vhost-vdpa: pass mm to bind vhost-vdpa: VHOST_NEW_OWNER vhost-vdpa: VHOST_BACKEND_F_NEW_OWNER vhost

[RFC V1 02/13] vhost-vdpa: pass mm to bind

2024-01-10 Thread Steve Sistare
Pass the target mm to vhost_vdpa_bind_mm. No functional change. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 10fb95bcca1a..2269988d6d33 100644 --- a/drivers

[RFC V1 01/13] vhost-vdpa: count pinned memory

2024-01-10 Thread Steve Sistare
Remember the count of pinned memory for the device. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index da7ec77cdaff..10fb95bcca1a 100644 --- a/drivers/vhost/vdpa.c

[PATCH v4 05/10] sched/fair: Hoist idle_stamp up from idle_balance

2018-12-06 Thread Steve Sistare
Move the update of idle_stamp from idle_balance to the call site in pick_next_task_fair, to prepare for a future patch that adds work to pick_next_task_fair which must be included in the idle_stamp interval. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 31

[PATCH v4 04/10] sched/fair: Dynamically update cfs_overload_cpus

2018-12-06 Thread Steve Sistare
-by: Steve Sistare --- kernel/sched/fair.c | 52 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ee271bb..4e105db 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -21,6

[PATCH v4 05/10] sched/fair: Hoist idle_stamp up from idle_balance

2018-12-06 Thread Steve Sistare
Move the update of idle_stamp from idle_balance to the call site in pick_next_task_fair, to prepare for a future patch that adds work to pick_next_task_fair which must be included in the idle_stamp interval. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 31

[PATCH v4 04/10] sched/fair: Dynamically update cfs_overload_cpus

2018-12-06 Thread Steve Sistare
-by: Steve Sistare --- kernel/sched/fair.c | 52 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ee271bb..4e105db 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -21,6

[PATCH v4 01/10] sched: Provide sparsemask, a reduced contention bitmap

2018-12-06 Thread Steve Sistare
used by block drivers. Signed-off-by: Steve Sistare --- kernel/sched/sparsemask.h | 210 ++ 1 file changed, 210 insertions(+) create mode 100644 kernel/sched/sparsemask.h diff --git a/kernel/sched/sparsemask.h b/kernel/sched/sparsemask.h new file mode

[PATCH v4 03/10] sched/topology: Provide cfs_overload_cpus bitmap

2018-12-06 Thread Steve Sistare
From: Steve Sistare Define and initialize a sparse bitmap of overloaded CPUs, per last-level-cache scheduling domain, for use by the CFS scheduling class. Save a pointer to cfs_overload_cpus in the rq for efficient access. Signed-off-by: Steve Sistare --- include/linux/sched/topology.h | 1

[PATCH v4 06/10] sched/fair: Generalize the detach_task interface

2018-12-06 Thread Steve Sistare
The detach_task function takes a struct lb_env argument, but only needs a few of its members. Pass the rq and cpu arguments explicitly so the function may be called from code that is not based on lb_env. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 14

[PATCH v4 00/10] steal tasks to improve CPU utilization

2018-12-06 Thread Steve Sistare
n update_top_cache_domain instead of cpu_attach_domain - Rewrite sparsemask iterator for complete inlining - Cull and clean up sparsemask functions and moved all into sched/sparsemask.h Steve Sistare (10): sched: Provide sparsemask, a reduced contention bitmap sched/topology: Provide hooks to all

[PATCH v4 07/10] sched/fair: Provide can_migrate_task_llc

2018-12-06 Thread Steve Sistare
Define a simpler version of can_migrate_task called can_migrate_task_llc which does not require a struct lb_env argument, and judges whether a migration from one CPU to another within the same LLC should be allowed. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 28

[PATCH v4 02/10] sched/topology: Provide hooks to allocate data shared per LLC

2018-12-06 Thread Steve Sistare
in __sdt_alloc() and then figured out which shared nodes are redundant. Signed-off-by: Steve Sistare --- kernel/sched/topology.c | 75 - 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c

[PATCH v4 01/10] sched: Provide sparsemask, a reduced contention bitmap

2018-12-06 Thread Steve Sistare
used by block drivers. Signed-off-by: Steve Sistare --- kernel/sched/sparsemask.h | 210 ++ 1 file changed, 210 insertions(+) create mode 100644 kernel/sched/sparsemask.h diff --git a/kernel/sched/sparsemask.h b/kernel/sched/sparsemask.h new file mode

[PATCH v4 03/10] sched/topology: Provide cfs_overload_cpus bitmap

2018-12-06 Thread Steve Sistare
From: Steve Sistare Define and initialize a sparse bitmap of overloaded CPUs, per last-level-cache scheduling domain, for use by the CFS scheduling class. Save a pointer to cfs_overload_cpus in the rq for efficient access. Signed-off-by: Steve Sistare --- include/linux/sched/topology.h | 1

[PATCH v4 06/10] sched/fair: Generalize the detach_task interface

2018-12-06 Thread Steve Sistare
The detach_task function takes a struct lb_env argument, but only needs a few of its members. Pass the rq and cpu arguments explicitly so the function may be called from code that is not based on lb_env. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 14

[PATCH v4 00/10] steal tasks to improve CPU utilization

2018-12-06 Thread Steve Sistare
n update_top_cache_domain instead of cpu_attach_domain - Rewrite sparsemask iterator for complete inlining - Cull and clean up sparsemask functions and moved all into sched/sparsemask.h Steve Sistare (10): sched: Provide sparsemask, a reduced contention bitmap sched/topology: Provide hooks to all

[PATCH v4 07/10] sched/fair: Provide can_migrate_task_llc

2018-12-06 Thread Steve Sistare
Define a simpler version of can_migrate_task called can_migrate_task_llc which does not require a struct lb_env argument, and judges whether a migration from one CPU to another within the same LLC should be allowed. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 28

[PATCH v4 02/10] sched/topology: Provide hooks to allocate data shared per LLC

2018-12-06 Thread Steve Sistare
in __sdt_alloc() and then figured out which shared nodes are redundant. Signed-off-by: Steve Sistare --- kernel/sched/topology.c | 75 - 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c

[PATCH v4 10/10] sched/fair: Provide idle search schedstats

2018-12-06 Thread Steve Sistare
d anything idle. field 14: time in nanoseconds spent in functions that search for idle CPUs and search for tasks to steal. field 15: # of times an idle CPU steals a task from another CPU. field 16: # of times try_steal finds overloaded CPUs but no task is migratable. Signed-off

[PATCH v4 09/10] sched/fair: disable stealing if too many NUMA nodes

2018-12-06 Thread Steve Sistare
make room for the other. For now, disable STEAL on such systems until we can do better, or it is shown that hackbench is atypical and most workloads benefit from stealing. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 16 +--- kernel/sched/sched.h|

[PATCH v4 10/10] sched/fair: Provide idle search schedstats

2018-12-06 Thread Steve Sistare
d anything idle. field 14: time in nanoseconds spent in functions that search for idle CPUs and search for tasks to steal. field 15: # of times an idle CPU steals a task from another CPU. field 16: # of times try_steal finds overloaded CPUs but no task is migratable. Signed-off

[PATCH v4 09/10] sched/fair: disable stealing if too many NUMA nodes

2018-12-06 Thread Steve Sistare
make room for the other. For now, disable STEAL on such systems until we can do better, or it is shown that hackbench is atypical and most workloads benefit from stealing. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 16 +--- kernel/sched/sched.h|

[PATCH v4 08/10] sched/fair: Steal work from an overloaded CPU when CPU goes idle

2018-12-06 Thread Steve Sistare
64 12823.00.24 12823.60.26 0.0 ----- Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 169 ++-- kernel/sched/features.h | 6 ++ 2 files changed, 170 insertions(+), 5 dele

[PATCH v4 08/10] sched/fair: Steal work from an overloaded CPU when CPU goes idle

2018-12-06 Thread Steve Sistare
64 12823.00.24 12823.60.26 0.0 ----- Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 169 ++-- kernel/sched/features.h | 6 ++ 2 files changed, 170 insertions(+), 5 dele

[PATCH v3 01/10] sched: Provide sparsemask, a reduced contention bitmap

2018-11-09 Thread Steve Sistare
From: Steve Sistare Provide struct sparsemask and functions to manipulate it. A sparsemask is a sparse bitmap. It reduces cache contention vs the usual bitmap when many threads concurrently set, clear, and visit elements, by reducing the number of significant bits per cacheline. For each 64

[PATCH v3 07/10] sched/fair: Provide can_migrate_task_llc

2018-11-09 Thread Steve Sistare
Define a simpler version of can_migrate_task called can_migrate_task_llc which does not require a struct lb_env argument, and judges whether a migration from one CPU to another within the same LLC should be allowed. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 28

[PATCH v3 06/10] sched/fair: Generalize the detach_task interface

2018-11-09 Thread Steve Sistare
The detach_task function takes a struct lb_env argument, but only needs a few of its members. Pass the rq and cpu arguments explicitly so the function may be called from code that is not based on lb_env. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 14

[PATCH v3 01/10] sched: Provide sparsemask, a reduced contention bitmap

2018-11-09 Thread Steve Sistare
From: Steve Sistare Provide struct sparsemask and functions to manipulate it. A sparsemask is a sparse bitmap. It reduces cache contention vs the usual bitmap when many threads concurrently set, clear, and visit elements, by reducing the number of significant bits per cacheline. For each 64

[PATCH v3 07/10] sched/fair: Provide can_migrate_task_llc

2018-11-09 Thread Steve Sistare
Define a simpler version of can_migrate_task called can_migrate_task_llc which does not require a struct lb_env argument, and judges whether a migration from one CPU to another within the same LLC should be allowed. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 28

[PATCH v3 06/10] sched/fair: Generalize the detach_task interface

2018-11-09 Thread Steve Sistare
The detach_task function takes a struct lb_env argument, but only needs a few of its members. Pass the rq and cpu arguments explicitly so the function may be called from code that is not based on lb_env. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 14

[PATCH v3 09/10] sched/fair: disable stealing if too many NUMA nodes

2018-11-09 Thread Steve Sistare
make room for the other. For now, disable STEAL on such systems until we can do better, or it is shown that hackbench is atypical and most workloads benefit from stealing. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 16 +--- kernel/sched/sched.h|

[PATCH v3 00/10] steal tasks to improve CPU utilization

2018-11-09 Thread Steve Sistare
Update series for kernel 4.20. Context changes only. Steve Sistare (10): sched: Provide sparsemask, a reduced contention bitmap sched/topology: Provide hooks to allocate data shared per LLC sched/topology: Provide cfs_overload_cpus bitmap sched/fair: Dynamically update cfs_overload_cpus s

[PATCH v3 02/10] sched/topology: Provide hooks to allocate data shared per LLC

2018-11-09 Thread Steve Sistare
in __sdt_alloc() and then figured out which shared nodes are redundant. Signed-off-by: Steve Sistare --- kernel/sched/topology.c | 75 - 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c

[PATCH v3 09/10] sched/fair: disable stealing if too many NUMA nodes

2018-11-09 Thread Steve Sistare
make room for the other. For now, disable STEAL on such systems until we can do better, or it is shown that hackbench is atypical and most workloads benefit from stealing. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 16 +--- kernel/sched/sched.h|

[PATCH v3 00/10] steal tasks to improve CPU utilization

2018-11-09 Thread Steve Sistare
Update series for kernel 4.20. Context changes only. Steve Sistare (10): sched: Provide sparsemask, a reduced contention bitmap sched/topology: Provide hooks to allocate data shared per LLC sched/topology: Provide cfs_overload_cpus bitmap sched/fair: Dynamically update cfs_overload_cpus s

[PATCH v3 02/10] sched/topology: Provide hooks to allocate data shared per LLC

2018-11-09 Thread Steve Sistare
in __sdt_alloc() and then figured out which shared nodes are redundant. Signed-off-by: Steve Sistare --- kernel/sched/topology.c | 75 - 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c

[PATCH v3 10/10] sched/fair: Provide idle search schedstats

2018-11-09 Thread Steve Sistare
d anything idle. field 14: time in nanoseconds spent in functions that search for idle CPUs and search for tasks to steal. field 15: # of times an idle CPU steals a task from another CPU. field 16: # of times try_steal finds overloaded CPUs but no task is migratable. Signed-off

[PATCH v3 10/10] sched/fair: Provide idle search schedstats

2018-11-09 Thread Steve Sistare
d anything idle. field 14: time in nanoseconds spent in functions that search for idle CPUs and search for tasks to steal. field 15: # of times an idle CPU steals a task from another CPU. field 16: # of times try_steal finds overloaded CPUs but no task is migratable. Signed-off

[PATCH v3 08/10] sched/fair: Steal work from an overloaded CPU when CPU goes idle

2018-11-09 Thread Steve Sistare
64 12823.00.24 12823.60.26 0.0 ----- Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 169 ++-- kernel/sched/features.h | 6 ++ 2 files changed, 170 insertions(+), 5 dele

[PATCH v3 05/10] sched/fair: Hoist idle_stamp up from idle_balance

2018-11-09 Thread Steve Sistare
Move the update of idle_stamp from idle_balance to the call site in pick_next_task_fair, to prepare for a future patch that adds work to pick_next_task_fair which must be included in the idle_stamp interval. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 23

[PATCH v3 03/10] sched/topology: Provide cfs_overload_cpus bitmap

2018-11-09 Thread Steve Sistare
From: Steve Sistare Define and initialize a sparse bitmap of overloaded CPUs, per last-level-cache scheduling domain, for use by the CFS scheduling class. Save a pointer to cfs_overload_cpus in the rq for efficient access. Signed-off-by: Steve Sistare --- include/linux/sched/topology.h | 1

[PATCH v3 05/10] sched/fair: Hoist idle_stamp up from idle_balance

2018-11-09 Thread Steve Sistare
Move the update of idle_stamp from idle_balance to the call site in pick_next_task_fair, to prepare for a future patch that adds work to pick_next_task_fair which must be included in the idle_stamp interval. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 23

[PATCH v3 03/10] sched/topology: Provide cfs_overload_cpus bitmap

2018-11-09 Thread Steve Sistare
From: Steve Sistare Define and initialize a sparse bitmap of overloaded CPUs, per last-level-cache scheduling domain, for use by the CFS scheduling class. Save a pointer to cfs_overload_cpus in the rq for efficient access. Signed-off-by: Steve Sistare --- include/linux/sched/topology.h | 1

[PATCH v3 08/10] sched/fair: Steal work from an overloaded CPU when CPU goes idle

2018-11-09 Thread Steve Sistare
64 12823.00.24 12823.60.26 0.0 ----- Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 169 ++-- kernel/sched/features.h | 6 ++ 2 files changed, 170 insertions(+), 5 dele

[PATCH v3 04/10] sched/fair: Dynamically update cfs_overload_cpus

2018-11-09 Thread Steve Sistare
-by: Steve Sistare --- kernel/sched/fair.c | 52 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ee271bb..9031d39 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -23,6

[PATCH v3 04/10] sched/fair: Dynamically update cfs_overload_cpus

2018-11-09 Thread Steve Sistare
-by: Steve Sistare --- kernel/sched/fair.c | 52 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ee271bb..9031d39 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -23,6

[PATCH v2 10/10] sched/fair: Provide idle search schedstats

2018-11-05 Thread Steve Sistare
d anything idle. field 14: time in nanoseconds spent in functions that search for idle CPUs and search for tasks to steal. field 15: # of times an idle CPU steals a task from another CPU. field 16: # of times try_steal finds overloaded CPUs but no task is migratable. Signed-off

[PATCH v2 10/10] sched/fair: Provide idle search schedstats

2018-11-05 Thread Steve Sistare
d anything idle. field 14: time in nanoseconds spent in functions that search for idle CPUs and search for tasks to steal. field 15: # of times an idle CPU steals a task from another CPU. field 16: # of times try_steal finds overloaded CPUs but no task is migratable. Signed-off

[PATCH v2 01/10] sched: Provide sparsemask, a reduced contention bitmap

2018-11-05 Thread Steve Sistare
From: Steve Sistare Provide struct sparsemask and functions to manipulate it. A sparsemask is a sparse bitmap. It reduces cache contention vs the usual bitmap when many threads concurrently set, clear, and visit elements, by reducing the number of significant bits per cacheline. For each 64

[PATCH v2 09/10] sched/fair: disable stealing if too many NUMA nodes

2018-11-05 Thread Steve Sistare
make room for the other. For now, disable STEAL on such systems until we can do better, or it is shown that hackbench is atypical and most workloads benefit from stealing. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 16 +--- kernel/sched/sched.h|

[PATCH v2 06/10] sched/fair: Generalize the detach_task interface

2018-11-05 Thread Steve Sistare
The detach_task function takes a struct lb_env argument, but only needs a few of its members. Pass the rq and cpu arguments explicitly so the function may be called from code that is not based on lb_env. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 14

[PATCH v2 01/10] sched: Provide sparsemask, a reduced contention bitmap

2018-11-05 Thread Steve Sistare
From: Steve Sistare Provide struct sparsemask and functions to manipulate it. A sparsemask is a sparse bitmap. It reduces cache contention vs the usual bitmap when many threads concurrently set, clear, and visit elements, by reducing the number of significant bits per cacheline. For each 64

[PATCH v2 09/10] sched/fair: disable stealing if too many NUMA nodes

2018-11-05 Thread Steve Sistare
make room for the other. For now, disable STEAL on such systems until we can do better, or it is shown that hackbench is atypical and most workloads benefit from stealing. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 16 +--- kernel/sched/sched.h|

[PATCH v2 06/10] sched/fair: Generalize the detach_task interface

2018-11-05 Thread Steve Sistare
The detach_task function takes a struct lb_env argument, but only needs a few of its members. Pass the rq and cpu arguments explicitly so the function may be called from code that is not based on lb_env. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 14

[PATCH v2 03/10] sched/topology: Provide cfs_overload_cpus bitmap

2018-11-05 Thread Steve Sistare
From: Steve Sistare Define and initialize a sparse bitmap of overloaded CPUs, per last-level-cache scheduling domain, for use by the CFS scheduling class. Save a pointer to cfs_overload_cpus in the rq for efficient access. Signed-off-by: Steve Sistare --- include/linux/sched/topology.h | 1

[PATCH v2 03/10] sched/topology: Provide cfs_overload_cpus bitmap

2018-11-05 Thread Steve Sistare
From: Steve Sistare Define and initialize a sparse bitmap of overloaded CPUs, per last-level-cache scheduling domain, for use by the CFS scheduling class. Save a pointer to cfs_overload_cpus in the rq for efficient access. Signed-off-by: Steve Sistare --- include/linux/sched/topology.h | 1

[PATCH v2 04/10] sched/fair: Dynamically update cfs_overload_cpus

2018-11-05 Thread Steve Sistare
-by: Steve Sistare --- kernel/sched/fair.c | 52 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7fc4a37..c623338 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -23,6

[PATCH v2 08/10] sched/fair: Steal work from an overloaded CPU when CPU goes idle

2018-11-05 Thread Steve Sistare
64 12823.00.24 12823.60.26 0.0 ----- Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 169 ++-- kernel/sched/features.h | 6 ++ 2 files changed, 170 insertions(+), 5 dele

[PATCH v2 04/10] sched/fair: Dynamically update cfs_overload_cpus

2018-11-05 Thread Steve Sistare
-by: Steve Sistare --- kernel/sched/fair.c | 52 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7fc4a37..c623338 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -23,6

[PATCH v2 08/10] sched/fair: Steal work from an overloaded CPU when CPU goes idle

2018-11-05 Thread Steve Sistare
64 12823.00.24 12823.60.26 0.0 ----- Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 169 ++-- kernel/sched/features.h | 6 ++ 2 files changed, 170 insertions(+), 5 dele

[PATCH v2 05/10] sched/fair: Hoist idle_stamp up from idle_balance

2018-11-05 Thread Steve Sistare
Move the update of idle_stamp from idle_balance to the call site in pick_next_task_fair, to prepare for a future patch that adds work to pick_next_task_fair which must be included in the idle_stamp interval. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 22

[PATCH v2 05/10] sched/fair: Hoist idle_stamp up from idle_balance

2018-11-05 Thread Steve Sistare
Move the update of idle_stamp from idle_balance to the call site in pick_next_task_fair, to prepare for a future patch that adds work to pick_next_task_fair which must be included in the idle_stamp interval. No functional change. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 22

[PATCH v2 07/10] sched/fair: Provide can_migrate_task_llc

2018-11-05 Thread Steve Sistare
Define a simpler version of can_migrate_task called can_migrate_task_llc which does not require a struct lb_env argument, and judges whether a migration from one CPU to another within the same LLC should be allowed. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 28

[PATCH v2 02/10] sched/topology: Provide hooks to allocate data shared per LLC

2018-11-05 Thread Steve Sistare
in __sdt_alloc() and then figured out which shared nodes are redundant. Signed-off-by: Steve Sistare --- kernel/sched/topology.c | 75 - 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c

[PATCH v2 07/10] sched/fair: Provide can_migrate_task_llc

2018-11-05 Thread Steve Sistare
Define a simpler version of can_migrate_task called can_migrate_task_llc which does not require a struct lb_env argument, and judges whether a migration from one CPU to another within the same LLC should be allowed. Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 28

[PATCH v2 02/10] sched/topology: Provide hooks to allocate data shared per LLC

2018-11-05 Thread Steve Sistare
in __sdt_alloc() and then figured out which shared nodes are redundant. Signed-off-by: Steve Sistare --- kernel/sched/topology.c | 75 - 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c

[PATCH v2 00/10] steal tasks to improve CPU utilization

2018-11-05 Thread Steve Sistare
3.60.26 0.0 -- Changes from v1 to v2: - Remove stray find_time hunk from patch 5 - Fix "warning: label out defined but not used" for !CONFIG_SCHED_SMT - Set SCHED_STEAL_NODE_LIMIT_DEFAULT to 2 - Steal iff avg_idle exceeds the cost of stealing Steve Sistare (10): sched:

[PATCH v2 00/10] steal tasks to improve CPU utilization

2018-11-05 Thread Steve Sistare
3.60.26 0.0 -- Changes from v1 to v2: - Remove stray find_time hunk from patch 5 - Fix "warning: label out defined but not used" for !CONFIG_SCHED_SMT - Set SCHED_STEAL_NODE_LIMIT_DEFAULT to 2 - Steal iff avg_idle exceeds the cost of stealing Steve Sistare (10): sched:

[PATCH 08/10] sched/fair: Steal work from an overloaded CPU when CPU goes idle

2018-10-22 Thread Steve Sistare
64 12823.00.24 12823.60.26 0.0 ----- Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 160 ++-- kernel/sched/features.h | 6 ++ 2 files changed, 161 insertions(+), 5 dele

[PATCH 08/10] sched/fair: Steal work from an overloaded CPU when CPU goes idle

2018-10-22 Thread Steve Sistare
64 12823.00.24 12823.60.26 0.0 ----- Signed-off-by: Steve Sistare --- kernel/sched/fair.c | 160 ++-- kernel/sched/features.h | 6 ++ 2 files changed, 161 insertions(+), 5 dele

[PATCH 03/10] sched/topology: Provide cfs_overload_cpus bitmap

2018-10-22 Thread Steve Sistare
Define and initialize a sparse bitmap of overloaded CPUs, per last-level-cache scheduling domain, for use by the CFS scheduling class. Save a pointer to cfs_overload_cpus in the rq for efficient access. Signed-off-by: Steve Sistare --- include/linux/sched/topology.h | 1 + kernel/sched/sched.h

[PATCH 03/10] sched/topology: Provide cfs_overload_cpus bitmap

2018-10-22 Thread Steve Sistare
Define and initialize a sparse bitmap of overloaded CPUs, per last-level-cache scheduling domain, for use by the CFS scheduling class. Save a pointer to cfs_overload_cpus in the rq for efficient access. Signed-off-by: Steve Sistare --- include/linux/sched/topology.h | 1 + kernel/sched/sched.h

[PATCH 02/10] sched/topology: Provide hooks to allocate data shared per LLC

2018-10-22 Thread Steve Sistare
in __sdt_alloc() and then figured out which shared nodes are redundant. Signed-off-by: Steve Sistare --- kernel/sched/topology.c | 75 - 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c

[PATCH 02/10] sched/topology: Provide hooks to allocate data shared per LLC

2018-10-22 Thread Steve Sistare
in __sdt_alloc() and then figured out which shared nodes are redundant. Signed-off-by: Steve Sistare --- kernel/sched/topology.c | 75 - 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c

[PATCH 01/10] sched: Provide sparsemask, a reduced contention bitmap

2018-10-22 Thread Steve Sistare
, only the first K bits of the first word are used, and the remaining bits are ignored, where K is a creation time parameter. Thus a sparsemask that can represent a set of N elements is approximately (N/K * 64) bytes in size. Signed-off-by: Steve Sistare --- include/linux/sparsemask.h | 260

[PATCH 01/10] sched: Provide sparsemask, a reduced contention bitmap

2018-10-22 Thread Steve Sistare
, only the first K bits of the first word are used, and the remaining bits are ignored, where K is a creation time parameter. Thus a sparsemask that can represent a set of N elements is approximately (N/K * 64) bytes in size. Signed-off-by: Steve Sistare --- include/linux/sparsemask.h | 260

  1   2   >