From nobody Fri May 17 07:55:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1663599942634730.7822859851734; Mon, 19 Sep 2022 08:05:42 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.408804.651666 (Exim 4.92) (envelope-from ) id 1oaIKY-0007Nu-Qh; Mon, 19 Sep 2022 15:05:06 +0000 Received: by outflank-mailman (output) from mailman id 408804.651666; Mon, 19 Sep 2022 15:05:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oaIKY-0007Nk-Mz; Mon, 19 Sep 2022 15:05:06 +0000 Received: by outflank-mailman (input) for mailman id 408804; Mon, 19 Sep 2022 15:05:04 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oaIKW-0007NU-NF for xen-devel@lists.xenproject.org; Mon, 19 Sep 2022 15:05:04 +0000 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6e98468b-382c-11ed-bad8-01ff208a15ba; Mon, 19 Sep 2022 17:05:03 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 043C25C03B4; Mon, 19 Sep 2022 11:05:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 19 Sep 2022 11:05:00 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Sep 2022 11:04:58 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6e98468b-382c-11ed-bad8-01ff208a15ba DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t= 1663599900; x=1663686300; bh=odLXxxvz6nzbkbzsLziod48m46GNXZ+65lY HR3Efirk=; b=IkFyEF7Zhk7LlFdQFWorz3dd5x8SvrrW4HjqEDxh7jpQSqLAcGt tVjuD5y1RtJ4rjS4qH3YJkHn/ahyJs9pb7T8xIkaXjPr+Z7yJlZh5nYg6KOan5Pl QNj+rYq2CajRVJwotRKxI/OdYudWZF82ZlUNPOlPA75c0O4H5ew6aLAiE+nmVSIl fNWxDFULqwnAHXZkFD4y3bZzzq7a/q+TmDe2A7BAKBdHEUaVcr23Cx077U6kl0aV tsIgSvyRcRK1gHfRy0TkncOLDY85zfXcjBj1jkN0J1GxKVlyddwdQF7SJUUdchcj OWzN7ati0VbqR3IT40bRIe75ehN8X+b+epw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1663599900; x=1663686300; bh=odLXxxvz6nzbk bzsLziod48m46GNXZ+65lYHR3Efirk=; b=PmBJAMzXRHMaSGce8Xp8ZudPA1c6V Fw7+aeUyVQHlsqq5DlP8JFG6WejWKSF1Yx5F1hwX+SZx7wEPeuWpPAzuXczUx7iU bbDvxwzTzJiCgEoBy80WXTOUlu7D70R+kNm0OijQVTfGQvLPI8baYHq8lQY40A1f 2KyYxN9YHfBs2idPIXlfvVyUnbr3b/9+eN4RrsVo/DDI5T3qtNKH0HVQ5t+zkW01 dVIgCOSW4zPDG3bY0bMBxYgVgoXtAXrD67bxDfsZa4YDmCxbz1BIHWQRR5ijH2SJ S6eW4DzzN3HnfKYYk2E4m/iEvadrl7GvNOdTBiHJsKw8HI3b5ThHct+DA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvjedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofggtgfgsehtkeertdertdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeelkefh udelteelleelteetveeffeetffekteetjeehlefggeekleeghefhtdehvdenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrhgvkhes ihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhm X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , George Dunlap , Dario Faggioli , xen-devel@lists.xenproject.org Subject: [PATCH] xen: credit2: respect credit2_runqueue=all when arranging runqueues Date: Mon, 19 Sep 2022 17:04:53 +0200 Message-Id: <20220919150453.29927-1-marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1663599943775100001 Documentation for credit2_runqueue=3Dall 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=3Dall. Fixes: 8e2aa76dc167 ("xen: credit2: limit the max number of CPUs in a runqu= eue") Signed-off-by: Marek Marczykowski-G=C3=B3recki --- The whole thing is under cpu_runqueue_match() already, so maybe cpu_runqueue_siblings_match() isn't needed at all? --- xen/common/sched/credit2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c index 0e3f89e5378e..9b8ca4d5ae24 100644 --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -996,9 +996,13 @@ cpu_add_to_runqueue(const struct scheduler *ops, unsig= ned 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=3Dall, as long= as + * max_cpus_runq isn't violated. */ if ( rqd->refcnt < max_cpus_runq && (ops->cpupool->gran !=3D S= CHED_GRAN_cpu || - cpu_runqueue_siblings_match(rqd, cpu, max_cpus_runq)) ) + cpu_runqueue_siblings_match(rqd, cpu, max_cpus_runq) || + opt_runqueue =3D=3D OPT_RUNQUEUE_ALL) ) { /* * This runqueue is ok, but as we said, we also want an ev= en --=20 2.37.3