[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] xen: credit2: respect credit2_runqueue=all when arranging runqueues


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 15 Feb 2023 16:17:20 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3A6NwPDaj/ZH+tXLqgrQMa08nilj5M/qa5o8lwHFz30=; b=TXD3gGQquR//7tNfpE/SlFu1iln1uLZX6ERE1Yyl+M+WVaalKhrL7xme1wZ/zO7CvbvlndixF+YtjQcB7obxbmmJg5EuKJreQ+sfcI/yQ0C8we4iKQt99anqEPdOqyil1hNr2aZYrU6uZuaI16bRDVAVlDCZOJq/7P4pQ5o4uLutjdW5matgJHxFH5veRvhw65gJL8mT3U8gNJU/hcWkQoL5LPC7I2asuZv4KJ1Vy6avo7ux3e+aQ/KVD4uZBFgymT4DCTwciWsz8oSbz9PipZWQQhadhCBVBvGXZHM51nOw/JCPo6skLGB7imQd7G0QzCttqe5KJZi31YStvD/yGQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cB8cY4cxCH3ztgZfdRcV2xfHQK+OdkJukr8zM4Mmu1dT6JKhIWlixIf/k57dP0KljtGIf10qBx46dOLKsPGgs3/5sDGO26t+nlRLpxC1S1whX6oN9dvXO5v8L/lQLyLDzNTBwMMMS4zcJxFTI+JJPTkeynrgMMIhwO6ofTPX/nPQ3LKfmpruUrOKTWeWpos6SmggyAIbbdgfeotFY+UPj304rmhs+mJGYgZnQQvHXSxWxYcFhgDBKr2P9eogID7g5cSJ1D4Uw0GpR11h1T4aNgC65Lne2BtZh5eRjarEki2uZfCW3SyUlLqbENpiCc7EbrjZUNxv6v2b1OugBFwlxQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 15 Feb 2023 15:17:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 03.10.2022 18:21, Marek Marczykowski-Górecki wrote:
> Documentation for credit2_runqueue=all says it should create one queue
> for all pCPUs on the host. But since introduction
> sched_credit2_max_cpus_runqueue, it actually created separate runqueue
> per socket, even if the CPUs count is below
> sched_credit2_max_cpus_runqueue.
> 
> Adjust the condition to skip syblink check in case of
> credit2_runqueue=all.
> 
> Fixes: 8e2aa76dc167 ("xen: credit2: limit the max number of CPUs in a 
> runqueue")
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Juergen Gross <jgross@xxxxxxxx>

I've now committed this without maintainer ack.

> Changes in v2:
>  - fix indentation

I didn't go check v1, but ...

> --- a/xen/common/sched/credit2.c
> +++ b/xen/common/sched/credit2.c
> @@ -996,9 +996,14 @@ cpu_add_to_runqueue(const struct scheduler *ops, 
> unsigned int cpu)
>               *
>               * Otherwise, let's try to make sure that siblings stay in the
>               * same runqueue, pretty much under any cinrcumnstances.
> +             *
> +             * Furthermore, try to respect credit2_runqueue=all, as long as
> +             * max_cpus_runq isn't violated.
>               */
> -            if ( rqd->refcnt < max_cpus_runq && (ops->cpupool->gran != 
> SCHED_GRAN_cpu ||
> -                  cpu_runqueue_siblings_match(rqd, cpu, max_cpus_runq)) )
> +            if ( rqd->refcnt < max_cpus_runq &&
> +                    (ops->cpupool->gran != SCHED_GRAN_cpu ||
> +                     cpu_runqueue_siblings_match(rqd, cpu, max_cpus_runq) ||
> +                     opt_runqueue == OPT_RUNQUEUE_ALL) )

... this still looked like too deep indentation to me. I've taken the
liberty to adjust this while committing.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.