Re: [RFC 00/11] select_idle_sibling rework

2018-06-20 Thread Steven Sistare
On 6/19/2018 6:06 PM, Matt Fleming wrote: > On Wed, 30 May, at 04:22:36PM, Peter Zijlstra wrote: >> Hi all, >> >> This is all still very preliminary and could all still go up in flames (it >> has >> only seen hackbench so far). This is mostly the same code I posted yesterday, >> but hopefully in a

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-11 Thread Steven Sistare
On 1/11/2018 3:46 PM, Linus Torvalds wrote: > On Thu, Jan 11, 2018 at 12:37 PM, Thomas Gleixner wrote: >> >> 67a9108ed431 ("x86/efi: Build our own page table structures") >> >> got rid of EFI depending on real_mode_header->trampoline_pgd > > So I think it only got rid of by default - the codepath

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-11 Thread Steven Sistare
On 1/11/2018 5:30 PM, Thomas Gleixner wrote: > On Thu, 11 Jan 2018, Thomas Gleixner wrote: >> On Thu, 11 Jan 2018, Linus Torvalds wrote: >> >>> On Thu, Jan 11, 2018 at 12:37 PM, Thomas Gleixner >>> wrote: 67a9108ed431 ("x86/efi: Build our own page table structures") got rid of

Re: [RFC PATCH V2] sched: Improve scalability of select_idle_sibling using SMT balance

2018-01-09 Thread Steven Sistare
On 1/8/2018 5:18 PM, Peter Zijlstra wrote: > On Mon, Jan 08, 2018 at 02:12:37PM -0800, subhra mazumdar wrote: >> @@ -2751,6 +2763,31 @@ context_switch(struct rq *rq, struct task_struct >> *prev, >> struct task_struct *next, struct rq_flags *rf) >> { >> struct mm_struct *mm, *oldm

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

2018-11-26 Thread Steven Sistare
On 11/20/2018 7:42 AM, Valentin Schneider wrote: > On 19/11/2018 17:33, Steven Sistare wrote: > [...] >>> >>> Thinking about misfit stealing, we can't use the sd_llc_shared's because >>> on big.LITTLE misfit migrations happen across LLC domains. >>&

Re: [PATCH V2 0/6] VA to numa node information

2018-11-26 Thread Steven Sistare
On 11/9/2018 11:48 PM, Prakash Sangappa wrote: > On 9/24/18 10:14 AM, Michal Hocko wrote: >> On Fri 14-09-18 12:01:18, Steven Sistare wrote: >>> On 9/14/2018 1:56 AM, Michal Hocko wrote: >> [...] >>>> Why does this matter for something that is for analysis pur

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

2018-11-27 Thread Steven Sistare
On 11/9/2018 7:50 AM, Steve Sistare wrote: > 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 numb

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

2018-11-19 Thread Steven Sistare
On 11/9/2018 2:07 PM, Valentin Schneider wrote: > Hi Steve, > > On 09/11/2018 12:50, Steve Sistare wrote: >> 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

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

2018-11-19 Thread Steven Sistare
On 11/9/2018 12:38 PM, Valentin Schneider wrote: > Hi Steve, > > On 09/11/2018 12:50, Steve Sistare wrote: > [...] >> @@ -482,6 +484,10 @@ static void update_top_cache_domain(int cpu) >> dirty_sched_domain_sysctl(cpu); >> destroy_sched_domains(tmp); >> >> +sd = highest_flag_domain(

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

2018-11-19 Thread Steven Sistare
On 11/12/2018 11:42 AM, Valentin Schneider wrote: > Hi Steve, > > On 09/11/2018 12:50, Steve Sistare wrote: >> 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 c

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

2018-12-06 Thread Steven Sistare
On 11/27/2018 8:19 PM, Omar Sandoval wrote: > On Tue, Nov 27, 2018 at 10:16:56AM -0500, Steven Sistare wrote: >> On 11/9/2018 7:50 AM, Steve Sistare wrote: >>> From: Steve Sistare >>> >>> Provide struct sparsemask and functions to manipulate it. A sparsemask

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

2018-12-06 Thread Steven Sistare
On 12/3/2018 11:56 AM, Valentin Schneider wrote: > Hi Steve, > On 26/11/2018 19:06, Steven Sistare wrote: >> [...] >>> Mmm I was thinking we could abuse the wrap() and start at >>> (fls(prev_span) + 1), but we're not guaranteed to have contiguous spans - >>

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

2018-12-07 Thread Steven Sistare
On 12/7/2018 6:43 AM, Valentin Schneider wrote: > Hi Steve, > > On 06/12/2018 21:28, Steve Sistare wrote: > [...] > > FYI git gets lost when it comes to applying this one on tip/sched/core > (v4.20-rc5 based), but first applying it on rc1 then rebasing the stack > on rc5 works fine. > > [...]

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

2018-12-07 Thread Steven Sistare
On 12/7/2018 6:56 AM, Valentin Schneider wrote: > Hi Steve, > > On 06/12/2018 21:28, Steve Sistare wrote: > [...] >> @@ -6392,6 +6422,7 @@ static int wake_cap(struct task_struct *p, int cpu, >> int prev_cpu) >> static int >> select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag,

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

2018-12-07 Thread Steven Sistare
On 12/7/2018 3:20 PM, Valentin Schneider wrote: > Hi Steve, > > On 06/12/2018 21:28, Steve Sistare wrote: > [...] >> @@ -3724,6 +3725,28 @@ static inline void update_misfit_status(struct >> task_struct *p, struct rq *rq) >> rq->misfit_task_load = task_h_load(p); >> } >> >> +static void ov

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

2018-12-07 Thread Steven Sistare
On 12/7/2018 3:20 PM, Valentin Schneider wrote: > Hi Steve, > > On 06/12/2018 21:28, Steve Sistare wrote: > [...] >> @@ -1621,7 +1626,22 @@ static void __sdt_free(const struct cpumask *cpu_map) >> >> static int sd_llc_alloc(struct sched_domain *sd) >> { >> -/* Allocate sd->shared data here

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

2018-12-07 Thread Steven Sistare
On 12/7/2018 3:21 PM, Valentin Schneider wrote: > Hi Steve, > > On 06/12/2018 21:28, Steve Sistare wrote: > [...] >> @@ -6778,20 +6791,22 @@ static void check_preempt_wakeup(struct rq *rq, >> struct task_struct *p, int wake_ >> update_misfit_status(NULL, rq); >> >> /* >> - * We mu

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

2018-12-07 Thread Steven Sistare
On 12/7/2018 3:30 PM, Valentin Schneider wrote: > Hi Steve, > > On 06/12/2018 21:28, Steve Sistare wrote: >> When a CPU has no more CFS tasks to run, and idle_balance() fails to >> find a task, then attempt to steal a task from an overloaded CPU in the >> same LLC. Maintain and use a bitmap of ove

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

2018-11-09 Thread Steven Sistare
On 11/6/2018 1:14 PM, Steven Sistare wrote: > On 11/6/2018 12:52 PM, Valentin Schneider wrote: >> Hi Steve, >> >> On 05/11/2018 20:07, Steve Sistare wrote: >> [...] >>> The patch series is based on kernel 4.19.0-rc7. It compiles, boots, and >>&g

hackbench run scripts

2018-11-09 Thread Steven Sistare
Hi folks, I am attaching the bash helper scripts I used to run and post-process hackbench in case you find them useful. They compute the statistics and print a nicely formatted result: feat - Enable/disable one or more sched_features. runmany - run a command many times and print average ti

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

2018-12-10 Thread Steven Sistare
On 12/10/2018 11:10 AM, Vincent Guittot wrote: > Hi Steven, > > On Thu, 6 Dec 2018 at 22:38, Steve Sistare wrote: >> >> When a CPU has no more CFS tasks to run, and idle_balance() fails to >> find a task, then attempt to steal a task from an overloaded CPU in the >> same LLC. Maintain and use a b

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

2018-12-10 Thread Steven Sistare
On 12/10/2018 12:08 PM, Vincent Guittot wrote: > On Mon, 10 Dec 2018 at 17:33, Vincent Guittot > wrote: >> >> On Mon, 10 Dec 2018 at 17:29, Steven Sistare >> wrote: >>> >>> On 12/10/2018 11:10 AM, Vincent Guittot wrote: >>>> Hi Steven

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

2018-10-31 Thread Steven Sistare
On 10/29/2018 3:34 PM, Valentin Schneider wrote: > On 26/10/2018 19:28, Steven Sistare wrote: >> On 10/26/2018 2:04 PM, Valentin Schneider wrote: > [...] >>> >>> I was thinking that perhaps we could have scenarios where some rq's >>> keep stealing tasks

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

2018-10-31 Thread Steven Sistare
Thanks very much to everyone who has commented on my patch series. Here are the issues to be addressed in V2 of the series, and the person that suggested it, or raised the issue that led to it. Changes for V2: * Remove stray patch 10 hunk from patch 5 (Valentin) * Fix "warning: label out defin

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

2018-11-06 Thread Steven Sistare
On 11/6/2018 12:52 PM, Valentin Schneider wrote: > Hi Steve, > > On 05/11/2018 20:07, Steve Sistare wrote: > [...] >> The patch series is based on kernel 4.19.0-rc7. It compiles, boots, and >> runs with/without each of CONFIG_SCHED_SMT, CONFIG_SMP, CONFIG_SCHED_DEBUG, >> and CONFIG_PREEMPT. It r

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

2018-11-01 Thread Steven Sistare
On 10/22/2018 10:59 AM, Steve Sistare wrote: > When a CPU has no more CFS tasks to run, and idle_balance() fails to > find a task, then attempt to steal a task from an overloaded CPU in the > same LLC. Maintain and use a bitmap of overloaded CPUs to efficiently > identify candidates. To minimize s

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

2018-11-05 Thread Steven Sistare
On 11/2/2018 7:39 PM, Subhra Mazumdar wrote: > On 10/22/18 7:59 AM, Steve Sistare wrote: >> When a CPU has no more CFS tasks to run, and idle_balance() fails to >> find a task, then attempt to steal a task from an overloaded CPU in the >> same LLC. Maintain and use a bitmap of overloaded CPUs to ef

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

2018-10-23 Thread Steven Sistare
On 10/22/2018 10:59 AM, Steve Sistare wrote: [...] > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c > index f18c416..b7d2070 100644 > --- a/kernel/sched/topology.c > +++ b/kernel/sched/topology.c > @@ -1337,6 +1337,30 @@ static void init_numa_topology_type(void) > } > } > >

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

2018-10-24 Thread Steven Sistare
On 10/24/2018 11:34 AM, Valentin Schneider wrote: > Hi, > > On 22/10/2018 20:07, Steven Sistare wrote: >> On 10/22/2018 1:04 PM, Peter Zijlstra wrote: > [...] >> >> We could delete idle_balance() and use stealing exclusively for handling >> new idle. For each

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

2018-10-25 Thread Steven Sistare
On 10/25/2018 3:50 AM, Vincent Guittot wrote: > Hi Steve, > > On Mon, 22 Oct 2018 at 17:10, Steve Sistare wrote: >> >> When a CPU has no more CFS tasks to run, and idle_balance() fails to >> find a task, then attempt to steal a task from an overloaded CPU in the >> same LLC. Maintain and use a bi

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

2018-10-25 Thread Steven Sistare
On 10/25/2018 7:31 AM, Valentin Schneider wrote: > > On 24/10/2018 20:27, Steven Sistare wrote: > [...] >> Hi Valentin, >> >> Asymmetric systems could maintain a separate bitmap for misfits; set a bit >> when a CPU goes on CPU, clear it going off. When a fa

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

2018-10-25 Thread Steven Sistare
On 10/25/2018 9:47 AM, Valentin Schneider wrote: > Hi Steve, > > On 22/10/2018 15:59, Steve Sistare wrote: > [...] >> @@ -6740,8 +6744,19 @@ static void check_preempt_wakeup(struct rq *rq, >> struct task_struct *p, int wake_ >> return p; >> >> idle: >> +/* >> + * We must set idle_

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

2018-10-25 Thread Steven Sistare
On 10/25/2018 9:48 AM, Valentin Schneider wrote: > Hi Steve, > > On 22/10/2018 15:59, Steve Sistare wrote: > [...] >> +/* >> + * Try to steal a runnable CFS task from a CPU in the same LLC as @dst_rq, >> + * and migrate it to @dst_rq. rq_lock is held on entry and return, but >> + * may be dropped

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

2018-10-25 Thread Steven Sistare
On 10/25/2018 8:43 AM, Vincent Guittot wrote: > On Thu, 25 Oct 2018 at 13:29, Steven Sistare > wrote: >> >> On 10/25/2018 3:50 AM, Vincent Guittot wrote: >>> Hi Steve, >>> >>> On Mon, 22 Oct 2018 at 17:10, Steve Sistare >>> wrote:

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

2018-10-26 Thread Steven Sistare
On 10/26/2018 2:04 PM, Valentin Schneider wrote: > Hi Steve, > On 22/10/2018 15:59, Steve Sistare wrote: >> 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 t

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

2018-10-22 Thread Steven Sistare
On 10/22/2018 12:56 PM, Peter Zijlstra wrote: > On Mon, Oct 22, 2018 at 07:59:35AM -0700, Steve Sistare wrote: >> An overloaded CPU has more than 1 runnable task. When a CFS task wakes >> on a CPU, if h_nr_running transitions from 1 to more, then set the CPU in >> the cfs_overload_cpus bitmap. Wh

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

2018-10-22 Thread Steven Sistare
On 10/22/2018 1:06 PM, Peter Zijlstra wrote: > On Mon, Oct 22, 2018 at 07:59:40AM -0700, Steve Sistare wrote: >> The STEAL feature causes regressions on hackbench on larger NUMA systems, >> so disable it on systems with more than sched_steal_node_limit nodes >> (default 2). > > How come? From a qu

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

2018-10-22 Thread Steven Sistare
On 10/22/2018 1:04 PM, Peter Zijlstra wrote: > On Mon, Oct 22, 2018 at 07:59:31AM -0700, Steve Sistare wrote: >> When a CPU has no more CFS tasks to run, and idle_balance() fails to >> find a task, then attempt to steal a task from an overloaded CPU in the >> same LLC. Maintain and use a bitmap of

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

2018-10-22 Thread Steven Sistare
On 10/22/2018 2:47 PM, Steven Sistare wrote: > On 10/22/2018 1:06 PM, Peter Zijlstra wrote: >> On Mon, Oct 22, 2018 at 07:59:40AM -0700, Steve Sistare wrote: >>> The STEAL feature causes regressions on hackbench on larger NUMA systems, >>> so disable i

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

2024-01-17 Thread Steven Sistare
On 1/11/2024 9:28 PM, Jason Wang wrote: > On Fri, Jan 12, 2024 at 12:18 AM Mike Christie > wrote: >> >> On 1/10/24 9:09 PM, Jason Wang wrote: >>> On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare >>> wrote: To pass ownership of a live vdpa device to a new process, the user suspends th

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

2024-01-17 Thread Steven Sistare
On 1/16/2024 1:57 PM, Eugenio Perez Martin wrote: > On Wed, Jan 10, 2024 at 9:40 PM Steve Sistare > wrote: >> >> To pass ownership of a live vdpa device to a new process, the user >> suspends the device, calls VHOST_NEW_OWNER to change the mm, and calls >> VHOST_IOTLB_REMAP to change the user vir

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

2024-01-17 Thread Steven Sistare
On 1/10/2024 10:09 PM, Jason Wang wrote: > On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare > wrote: >> >> To pass ownership of a live vdpa device to a new process, the user >> suspends the device, calls VHOST_NEW_OWNER to change the mm, and calls >> VHOST_IOTLB_REMAP to change the user virtual addr

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

2024-01-17 Thread Steven Sistare
On 1/10/2024 10:08 PM, Jason Wang wrote: > On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare > wrote: >> >> When device ownership is passed to a new process via VHOST_NEW_OWNER, >> some devices need to know the new userland addresses of the dma mappings. >> Define the new iotlb message type VHOST_IOT

Re: [RFC V1 00/13] vdpa live update

2024-01-17 Thread Steven Sistare
On 1/10/2024 9:55 PM, Jason Wang wrote: > On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare > wrote: >> >> Live update is a technique wherein an application saves its state, exec's >> to an updated version of itself, and restores its state. Clients of the >> application experience a brief suspension

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

2024-01-17 Thread Steven Sistare
On 1/10/2024 5:24 PM, Michael S. Tsirkin wrote: > On Wed, Jan 10, 2024 at 12:40:03PM -0800, Steve Sistare wrote: >> Remember the count of pinned memory for the device. >> >> Signed-off-by: Steve Sistare > > Can we have iommufd support in vdpa so we do not keep extending these hacks? I assume thi

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

2024-02-09 Thread Steven Sistare
On 1/16/2024 1:14 PM, Eugenio Perez Martin wrote: > On Wed, Jan 10, 2024 at 9:40 PM Steve Sistare > wrote: >> >> When device ownership is passed to a new process via VHOST_NEW_OWNER, >> some devices need to know the new userland addresses of the dma mappings. >> Define the new iotlb message type

Re: [PATCH V1] vdpa_sim: reset must not run

2024-02-09 Thread Steven Sistare
On 1/22/2024 5:59 AM, Stefano Garzarella wrote: > On Mon, Jan 22, 2024 at 11:47:22AM +0100, Eugenio Perez Martin wrote: >> On Mon, Jan 22, 2024 at 11:22 AM Stefano Garzarella >> wrote: >>> >>> On Wed, Jan 17, 2024 at 11:23:23AM -0800, Steve Sistare wrote: >>> >vdpasim_do_reset sets running to tru

Re: [PATCH V1] vdpa: suspend and resume require DRIVER_OK

2024-02-12 Thread Steven Sistare
On 2/12/2024 3:19 AM, Michael S. Tsirkin wrote: > On Fri, Feb 09, 2024 at 02:29:59PM -0800, Steve Sistare wrote: >> Calling suspend or resume requires VIRTIO_CONFIG_S_DRIVER_OK, for all >> vdpa devices. >> >> Suggested-by: Eugenio Perez Martin " >> Signed-off-by: Steve Sistare > > I don't think f

Re: [PATCH V1] vdpa: suspend and resume require DRIVER_OK

2024-02-12 Thread Steven Sistare
On 2/12/2024 10:56 AM, Michael S. Tsirkin wrote: > On Mon, Feb 12, 2024 at 09:56:31AM -0500, Steven Sistare wrote: >> On 2/12/2024 3:19 AM, Michael S. Tsirkin wrote: >>> On Fri, Feb 09, 2024 at 02:29:59PM -0800, Steve Sistare wrote: >>>> Calling suspend or resume requ

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

2024-02-13 Thread Steven Sistare
On 2/13/2024 9:58 AM, Eugenio Perez Martin wrote: > On Tue, Feb 13, 2024 at 3:26 PM Steve Sistare > wrote: >> >> 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

Re: [PATCH V2 0/3] flush workers on suspend

2024-02-13 Thread Steven Sistare
On 2/12/2024 12:16 PM, Steve Sistare wrote: > 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.) Changes in V2: - renamed "vduse: suspend" (was v

Re: [PATCH V2] vdpa_sim: reset must not run

2024-02-13 Thread Steven Sistare
Changes in V2: - test DRIVER_OK instead of FEATURES_OK - post singly, and add RB and acks - Steve On 2/9/2024 5:30 PM, Steve Sistare wrote: > 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. T

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

2024-02-14 Thread Steven Sistare
On 2/13/2024 10:58 AM, Eugenio Perez Martin wrote: > On Mon, Feb 12, 2024 at 6:16 PM Steve Sistare > wrote: >> >> Flush to guarantee no workers are running when suspend returns. >> >> Signed-off-by: Steve Sistare > > Acked-by: Eugenio Pérez > > Should this have a Fixes tag? Sure, I will add:

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

2024-02-14 Thread Steven Sistare
On 2/13/2024 11:10 AM, Eugenio Perez Martin wrote: > On Mon, Feb 12, 2024 at 6:16 PM Steve Sistare > wrote: >> >> 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,

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

2024-02-14 Thread Steven Sistare
On 2/14/2024 2:39 PM, Eugenio Perez Martin wrote: > On Wed, Feb 14, 2024 at 6:50 PM Steven Sistare > wrote: >> >> On 2/13/2024 11:10 AM, Eugenio Perez Martin wrote: >>> On Mon, Feb 12, 2024 at 6:16 PM Steve Sistare >>> wrote: >>>> >>>

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

2024-02-16 Thread Steven Sistare
On 2/15/2024 10:44 AM, Eugenio Perez Martin wrote: > On Wed, Feb 14, 2024 at 8:52 PM Steven Sistare > wrote: >> >> On 2/14/2024 2:39 PM, Eugenio Perez Martin wrote: >>> On Wed, Feb 14, 2024 at 6:50 PM Steven Sistare >>> wrote: >>>> >>>>

Re: [PATCH V3] vdpa/mlx5: preserve CVQ vringh index

2023-12-04 Thread Steven Sistare
What's the decision here, pull it, or do not fix it? - Steve On 11/3/2023 8:26 AM, Steve Sistare wrote: > mlx5_vdpa does not preserve userland's view of vring base for the control > queue in the following sequence: > > ioctl VHOST_SET_VRING_BASE > ioctl VHOST_VDPA_SET_STATUS VIRTIO_CONFIG_S_DRIV

Re: [PATCH V3] vdpa/mlx5: preserve CVQ vringh index

2023-12-04 Thread Steven Sistare
Glad to hear it, thanks - Steve On 12/4/2023 8:35 AM, Michael S. Tsirkin wrote: > It's in my tee and I'm sending it to Linus. > > On Mon, Dec 04, 2023 at 08:33:22AM -0500, Steven Sistare wrote: >> What's the decision here, pull it, or do not fix it? >> &

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

2024-05-21 Thread Steven Sistare
On 5/20/2024 10:28 PM, Jason Wang wrote: On Mon, May 20, 2024 at 11:21 PM Steve Sistare wrote: 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/vh

Re: [PATCH V3 2/3] vduse: suspend

2024-05-21 Thread Steven Sistare
On 5/20/2024 10:30 PM, Jason Wang wrote: On Mon, May 20, 2024 at 11:21 PM Steve Sistare wrote: 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 |

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

2024-05-21 Thread Steven Sistare
On 5/20/2024 10:32 PM, Jason Wang wrote: On Mon, May 20, 2024 at 11:21 PM Steve Sistare wrote: 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 bec

Re: [PATCH V2 0/7] vdpa live update

2024-07-12 Thread Steven Sistare
On 7/12/2024 9:18 AM, Steve Sistare wrote: Live update is a technique wherein an application saves its state, exec's to an updated version of itself, and restores its state. Clients of the application experience a brief suspension of service, on the order of 100's of milliseconds, but are otherw

Re: [PATCH V2 3/7] vhost-vdpa: VHOST_NEW_OWNER

2024-07-15 Thread Steven Sistare
On 7/14/2024 10:26 PM, Jason Wang wrote: On Fri, Jul 12, 2024 at 9:19 PM Steve Sistare wrote: Add an ioctl to transfer file descriptor ownership and pinned memory accounting from one process to another. This is more efficient than VHOST_RESET_OWNER followed by VHOST_SET_OWNER, as that would u

Re: [PATCH V2 4/7] vhost-vdpa: VHOST_BACKEND_F_NEW_OWNER

2024-07-15 Thread Steven Sistare
On 7/14/2024 10:31 PM, Jason Wang wrote: On Fri, Jul 12, 2024 at 9:19 PM Steve Sistare wrote: Add the VHOST_BACKEND_F_NEW_OWNER backend capability, which indicates that VHOST_NEW_OWNER is supported. Signed-off-by: Steve Sistare Doesn't harm but should this be part of the previous patch?

Re: [PATCH V2 5/7] vhost-vdpa: VHOST_IOTLB_REMAP

2024-07-15 Thread Steven Sistare
On 7/14/2024 10:34 PM, Jason Wang wrote: On Fri, Jul 12, 2024 at 9:19 PM Steve Sistare wrote: When device ownership is passed to a new process via VHOST_NEW_OWNER, some devices need to know the new userland addresses of the dma mappings. Define the new iotlb message type VHOST_IOTLB_REMAP to u

Re: [PATCH V2 0/7] vdpa live update

2024-07-15 Thread Steven Sistare
On 7/14/2024 10:14 PM, Jason Wang wrote: On Fri, Jul 12, 2024 at 9:19 PM Steve Sistare wrote: Live update is a technique wherein an application saves its state, exec's to an updated version of itself, and restores its state. Clients of the application experience a brief suspension of service,

Re: [PATCH V2 3/7] vhost-vdpa: VHOST_NEW_OWNER

2024-07-15 Thread Steven Sistare
On 7/15/2024 5:07 AM, Michael S. Tsirkin wrote: On Fri, Jul 12, 2024 at 06:18:49AM -0700, Steve Sistare wrote: Add an ioctl to transfer file descriptor ownership and pinned memory accounting from one process to another. This is more efficient than VHOST_RESET_OWNER followed by VHOST_SET_OWNER,

Re: [PATCH V2 3/7] vhost-vdpa: VHOST_NEW_OWNER

2024-07-15 Thread Steven Sistare
On 7/15/2024 10:38 AM, Michael S. Tsirkin wrote: On Mon, Jul 15, 2024 at 10:29:26AM -0400, Steven Sistare wrote: On 7/15/2024 5:07 AM, Michael S. Tsirkin wrote: On Fri, Jul 12, 2024 at 06:18:49AM -0700, Steve Sistare wrote: Add an ioctl to transfer file descriptor ownership and pinned memory

Re: [PATCH V2 3/7] vhost-vdpa: VHOST_NEW_OWNER

2024-07-17 Thread Steven Sistare
On 7/16/2024 1:16 AM, Jason Wang wrote: On Mon, Jul 15, 2024 at 10:27 PM Steven Sistare wrote: On 7/14/2024 10:26 PM, Jason Wang wrote: On Fri, Jul 12, 2024 at 9:19 PM Steve Sistare wrote: Add an ioctl to transfer file descriptor ownership and pinned memory accounting from one process to

Re: [PATCH V2 5/7] vhost-vdpa: VHOST_IOTLB_REMAP

2024-07-17 Thread Steven Sistare
On 7/16/2024 1:28 AM, Jason Wang wrote: On Mon, Jul 15, 2024 at 10:28 PM Steven Sistare wrote: On 7/14/2024 10:34 PM, Jason Wang wrote: On Fri, Jul 12, 2024 at 9:19 PM Steve Sistare wrote: When device ownership is passed to a new process via VHOST_NEW_OWNER, some devices need to know the

Re: [PATCH V2 0/7] vdpa live update

2024-07-17 Thread Steven Sistare
On 7/16/2024 1:30 AM, Jason Wang wrote: On Mon, Jul 15, 2024 at 10:29 PM Steven Sistare wrote: On 7/14/2024 10:14 PM, Jason Wang wrote: On Fri, Jul 12, 2024 at 9:19 PM Steve Sistare wrote: Live update is a technique wherein an application saves its state, exec's to an updated versi

Re: [PATCH V2 5/7] vhost-vdpa: VHOST_IOTLB_REMAP

2024-07-18 Thread Steven Sistare
On 7/18/2024 3:39 PM, Michael S. Tsirkin wrote: On Thu, Jul 18, 2024 at 08:45:31AM +0800, Jason Wang wrote: For example: 1) old owner pass fd to new owner which is another process 2) the new owner do VHOST_NEW_OWNER 3) new owner doesn't do remap correctly There's no way for the old owner to re

Re: [PATCH V2 0/7] vdpa live update

2024-07-20 Thread Steven Sistare
On 7/17/2024 8:33 PM, Jason Wang wrote: On Thu, Jul 18, 2024 at 2:29 AM Steven Sistare wrote: On 7/16/2024 1:30 AM, Jason Wang wrote: On Mon, Jul 15, 2024 at 10:29 PM Steven Sistare wrote: On 7/14/2024 10:14 PM, Jason Wang wrote: On Fri, Jul 12, 2024 at 9:19 PM Steve Sistare wrote

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-30 Thread Steven Sistare
On 7/30/2020 11:22 AM, Matthew Wilcox wrote: > On Mon, Jul 27, 2020 at 10:11:22AM -0700, Anthony Yznaga wrote: >> This patchset adds support for preserving an anonymous memory range across >> exec(3) using a new madvise MADV_DOEXEC argument. The primary benefit for >> sharing memory in this manner

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-30 Thread Steven Sistare
On 7/30/2020 1:12 PM, Matthew Wilcox wrote: > On Thu, Jul 30, 2020 at 11:59:42AM -0400, Steven Sistare wrote: >> On 7/30/2020 11:22 AM, Matthew Wilcox wrote: >>> On Mon, Jul 27, 2020 at 10:11:22AM -0700, Anthony Yznaga wrote: >>>> This patchset adds support for preser

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-30 Thread Steven Sistare
On 7/30/2020 1:49 PM, Matthew Wilcox wrote: > On Thu, Jul 30, 2020 at 01:35:51PM -0400, Steven Sistare wrote: >> mshare + VA reservation is another possible solution. >> >> Or MADV_DOEXEC alone, which is ready now. I hope we can get back to >> reviewing that. >

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-31 Thread Steven Sistare
On 7/30/2020 5:58 PM, ebied...@xmission.com wrote: > Steven Sistare writes: >> On 7/30/2020 1:49 PM, Matthew Wilcox wrote: >>> On Thu, Jul 30, 2020 at 01:35:51PM -0400, Steven Sistare wrote: >>>> mshare + VA reservation is another possible solution. >>>>

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-31 Thread Steven Sistare
On 7/31/2020 11:27 AM, Matthew Wilcox wrote: > On Fri, Jul 31, 2020 at 10:57:44AM -0400, Steven Sistare wrote: >> Matthews sileby/mshare proposal has the same issue. If a process opts-in >> and mmap's an address in the shared region, then content becomes mapped at >>

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-31 Thread Steven Sistare
On 7/31/2020 12:56 PM, Jason Gunthorpe wrote: > On Fri, Jul 31, 2020 at 12:11:52PM -0400, Steven Sistare wrote: >>> Your preservation-across-exec use-case might or might not need the >>> VMA to be mapped at the same address. >> >> It does. qemu registers mem

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-31 Thread Steven Sistare
On 7/31/2020 1:48 PM, Jason Gunthorpe wrote: > On Fri, Jul 31, 2020 at 01:15:34PM -0400, Steven Sistare wrote: >> On 7/31/2020 12:56 PM, Jason Gunthorpe wrote: >>> On Fri, Jul 31, 2020 at 12:11:52PM -0400, Steven Sistare wrote: >>>>> Your preservation-across-exec

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-31 Thread Steven Sistare
On 7/27/2020 1:11 PM, Anthony Yznaga wrote: > This patchset adds support for preserving an anonymous memory range across > exec(3) using a new madvise MADV_DOEXEC argument. The primary benefit for > sharing memory in this manner, as opposed to re-attaching to a named shared > memory segment, is to

Re: [RFC PATCH] mm: align anon mmap for THP

2019-01-14 Thread Steven Sistare
On 1/11/2019 6:28 PM, Mike Kravetz wrote: > On 1/11/19 1:55 PM, Kirill A. Shutemov wrote: >> On Fri, Jan 11, 2019 at 08:10:03PM +, Mike Kravetz wrote: >>> At LPC last year, Boaz Harrosh asked why he had to 'jump through hoops' >>> to get an address returned by mmap() suitably aligned for THP.

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

2019-01-14 Thread Steven Sistare
Hi Peter and Ingo, I am waiting for one of you to review, ack, or reject this series. I have addressed all known issues. I have a reviewed-by from Valentin and a tested-by from Vincent which I will add to v5 if you approve the patch. - Steve On 12/6/2018 4:28 PM, Steve Sistare wrote: > When

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

2019-01-14 Thread Steven Sistare
On 12/24/2018 7:25 AM, Rick Lindsley wrote: > On 12/06/2018 01:28 PM, Steve Sistare wrote: >> Add schedstats to measure the effectiveness of searching for idle CPUs >> and stealing tasks.  This is a temporary patch intended for use during >> development only.  SCHEDSTAT_VERSION is bumped to 16, and

Re: [RFC PATCH] mm: align anon mmap for THP

2019-01-14 Thread Steven Sistare
On 1/14/2019 1:54 PM, Mike Kravetz wrote: > On 1/14/19 7:35 AM, Steven Sistare wrote: >> On 1/11/2019 6:28 PM, Mike Kravetz wrote: >>> On 1/11/19 1:55 PM, Kirill A. Shutemov wrote: >>>> On Fri, Jan 11, 2019 at 08:10:03PM +, Mike Kravetz wrote: >>>>>

Re: [RFC V2 2/2] sched/fair: Fallback to sched-idle CPU if idle CPU isn't found

2019-05-14 Thread Steven Sistare
On 5/13/2019 7:35 AM, Peter Zijlstra wrote: > On Mon, May 13, 2019 at 03:04:18PM +0530, Viresh Kumar wrote: >> On 10-05-19, 09:21, Peter Zijlstra wrote: > >>> I don't hate his per se; but the whole select_idle_sibling() thing is >>> something that needs looking at. >>> >>> There was the task steal

Re: [PATCH V2 0/6] VA to numa node information

2018-09-14 Thread Steven Sistare
On 9/14/2018 1:56 AM, Michal Hocko wrote: > On Thu 13-09-18 15:32:25, prakash.sangappa wrote: >> On 09/13/2018 01:40 AM, Michal Hocko wrote: >>> On Wed 12-09-18 13:23:58, Prakash Sangappa wrote: For analysis purpose it is useful to have numa node information corresponding mapped virtual a

Re: [RFC PATCH 1/2] pipe: introduce busy wait for pipe

2018-09-05 Thread Steven Sistare
On 9/4/2018 8:50 PM, Subhra Mazumdar wrote: > On 08/31/2018 09:09 AM, Steven Sistare wrote: >> On 8/30/2018 4:24 PM, subhra mazumdar wrote: >>> Introduce pipe_ll_usec field for pipes that indicates the amount of micro >>> seconds a thread should spin if pipe is empty or

Re: [RFC PATCH 1/2] pipe: introduce busy wait for pipe

2018-08-31 Thread Steven Sistare
On 8/30/2018 4:24 PM, subhra mazumdar wrote: > Introduce pipe_ll_usec field for pipes that indicates the amount of micro > seconds a thread should spin if pipe is empty or full before sleeping. This > is similar to network sockets. Workloads like hackbench in pipe mode > benefits significantly from

Re: [PATCH 1/2] ixgbe: release lock for the duration of ixgbe_suspend_close()

2018-05-03 Thread Steven Sistare
On 5/3/2018 9:46 AM, Alexander Duyck wrote: > On Thu, May 3, 2018 at 6:30 AM, Pavel Tatashin > wrote: >> Hi Alex, > > Hi Pavel, > >>> I'm not a fan of dropping the mutex while we go through >>> ixgbe_close_suspend. I'm concerned it will result in us having a >>> number of races on shutdown. >> >

Re: [RFC] sched/core: Don't schedule threads on pre-empted vcpus

2018-05-04 Thread Steven Sistare
On 5/4/2018 1:22 PM, Rohit Jain wrote: > Hi Peter, > > On 05/04/2018 02:47 AM, Peter Zijlstra wrote: >> On Wed, May 02, 2018 at 01:52:10PM -0700, Rohit Jain wrote: >>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c >>> index 5e10aae..75d1ecf 100644 >>> --- a/kernel/sched/core.c >>> +++ b/k

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-08-03 Thread Steven Sistare
On 8/3/2020 11:28 AM, ebied...@xmission.com wrote: > Steven Sistare writes: >> On 7/30/2020 5:58 PM, ebied...@xmission.com wrote: >>> Here is another suggestion. >>> >>> Have a very simple program that does: >>> >>> for (;

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-08-03 Thread Steven Sistare
On 8/3/2020 11:42 AM, James Bottomley wrote: > On Mon, 2020-08-03 at 10:28 -0500, Eric W. Biederman wrote: > [...] >> What is wrong with live migration between one qemu process and >> another qemu process on the same machine not work for this use case? >> >> Just reusing live migration would seem t

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-27 Thread Steven Sistare
On 7/27/2020 1:07 PM, ebied...@xmission.com wrote: > Anthony Yznaga writes: > >> This patchset adds support for preserving an anonymous memory range across >> exec(3) using a new madvise MADV_DOEXEC argument. The primary benefit for >> sharing memory in this manner, as opposed to re-attaching to

Re: [RFC PATCH 5/5] mm: introduce MADV_DOEXEC

2020-07-28 Thread Steven Sistare
On 7/28/2020 9:22 AM, Kirill Tkhai wrote: > On 27.07.2020 20:11, Anthony Yznaga wrote: >> madvise MADV_DOEXEC preserves a memory range across exec. Initially >> only supported for non-executable, non-stack, anonymous memory. >> MADV_DONTEXEC reverts the effect of a previous MADV_DOXEXEC call and >

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-28 Thread Steven Sistare
On 7/28/2020 10:23 AM, Andy Lutomirski wrote: >> On Jul 27, 2020, at 10:02 AM, Anthony Yznaga >> wrote: >> >> This patchset adds support for preserving an anonymous memory range across >> exec(3) using a new madvise MADV_DOEXEC argument. The primary benefit for >> sharing memory in this manner,

Re: [RFC 1/2] sched: reduce migration cost between faster caches for idle_balance

2018-02-15 Thread Steven Sistare
On 2/10/2018 1:37 AM, Mike Galbraith wrote: > On Fri, 2018-02-09 at 11:08 -0500, Steven Sistare wrote: >>>> @@ -8804,7 +8803,8 @@ static int idle_balance(struct rq *this_rq, struct >>>> rq_flags *rf) >>>>if (!(sd->flags & SD_L

Re: [RFC 1/2] sched: reduce migration cost between faster caches for idle_balance

2018-02-15 Thread Steven Sistare
On 2/15/2018 1:07 PM, Mike Galbraith wrote: > On Thu, 2018-02-15 at 11:35 -0500, Steven Sistare wrote: >> On 2/10/2018 1:37 AM, Mike Galbraith wrote: >>> On Fri, 2018-02-09 at 11:08 -0500, Steven Sistare wrote: >>>>>> @@ -8804,7 +8803,8 @@ static int idl

Re: [RFC 2/2] Introduce sysctl(s) for the migration costs

2018-02-09 Thread Steven Sistare
On 2/8/2018 10:54 PM, Mike Galbraith wrote: > On Thu, 2018-02-08 at 14:19 -0800, Rohit Jain wrote: >> This patch introduces the sysctl for sched_domain based migration costs. >> These in turn can be used for performance tuning of workloads. > > With this patch, we trade 1 completely bogus constant

Re: [RFC 1/2] sched: reduce migration cost between faster caches for idle_balance

2018-02-09 Thread Steven Sistare
On 2/8/2018 10:42 PM, Mike Galbraith wrote: > On Thu, 2018-02-08 at 14:19 -0800, Rohit Jain wrote: >> This patch makes idle_balance more dynamic as the sched_migration_cost >> is now accounted on a sched_domain level. This in turn is done in >> sd_init when we know what the topology relationships a

  1   2   >