From nobody Mon Feb 9 19:29:53 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1578497065; cv=none; d=zohomail.com; s=zohoarc; b=nNxwW/1s7ZmGgHWFlj2574bY4WyKCfFVcA9odlFB0mR3A/f9ZP+azmuJCX+yikp0c72MxK0SCmO8PGPQtbVlJFIcfWBREv9vvBagYhnm5BdVPIHW4V1DqmU6mk3TxDeinxCgttmhL01ShBPcBDZwImybB1NutQwrk9GPDS7AnBA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578497065; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9KeW1onabaJ/FQgv4bYsXo0baPqCKkmvShfOaYGMb6c=; b=bex9n+CrYqFpsbnQyvDDuye9NGRQJcdgkFfCeT8zXRGAyTVCIezNkiQJJrxsUp5ofxMwm+b+kbdWIlbGJHQphK+YY7TlNw/+Y5IFm0iE0wBi/EQG8NAlrd1/ny7+HJ1+RQgHmvETwzTDHiJoi5ETKltiU7YWAu8ZpyFCREzxa0E= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) 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 1578497065381480.17429143471566; Wed, 8 Jan 2020 07:24:25 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ipDBU-0004ST-6M; Wed, 08 Jan 2020 15:23:48 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ipDBS-0004Ru-H0 for xen-devel@lists.xenproject.org; Wed, 08 Jan 2020 15:23:46 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d46a53e8-322a-11ea-b1f0-bc764e2007e4; Wed, 08 Jan 2020 15:23:32 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E6E36B1E7; Wed, 8 Jan 2020 15:23:31 +0000 (UTC) X-Inumbo-ID: d46a53e8-322a-11ea-b1f0-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Wed, 8 Jan 2020 16:23:23 +0100 Message-Id: <20200108152328.27194-5-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200108152328.27194-1-jgross@suse.com> References: <20200108152328.27194-1-jgross@suse.com> Subject: [Xen-devel] [PATCH v2 4/9] xen/sched: remove special cases for free cpus in schedulers X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , George Dunlap , Dario Faggioli MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" With the idle scheduler now taking care of all cpus not in any cpupool the special cases in the other schedulers for no cpupool associated can be removed. Signed-off-by: Juergen Gross Reviewed-by: Dario Faggioli --- xen/common/sched/credit.c | 7 ++----- xen/common/sched/credit2.c | 30 ------------------------------ 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/xen/common/sched/credit.c b/xen/common/sched/credit.c index 4329d9df56..6b04f8f71c 100644 --- a/xen/common/sched/credit.c +++ b/xen/common/sched/credit.c @@ -1690,11 +1690,8 @@ csched_load_balance(struct csched_private *prv, int = cpu, =20 BUG_ON(get_sched_res(cpu) !=3D snext->unit->res); =20 - /* - * If this CPU is going offline, or is not (yet) part of any cpupool - * (as it happens, e.g., during cpu bringup), we shouldn't steal work. - */ - if ( unlikely(!cpumask_test_cpu(cpu, online) || c =3D=3D NULL) ) + /* If this CPU is going offline, we shouldn't steal work. */ + if ( unlikely(!cpumask_test_cpu(cpu, online)) ) goto out; =20 if ( snext->pri =3D=3D CSCHED_PRI_IDLE ) diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c index 65e8ab052e..849d254e04 100644 --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -2744,40 +2744,10 @@ static void csched2_unit_migrate( const struct scheduler *ops, struct sched_unit *unit, unsigned int new= _cpu) { - struct domain *d =3D unit->domain; struct csched2_unit * const svc =3D csched2_unit(unit); struct csched2_runqueue_data *trqd; s_time_t now =3D NOW(); =20 - /* - * Being passed a target pCPU which is outside of our cpupool is only - * valid if we are shutting down (or doing ACPI suspend), and we are - * moving everyone to BSP, no matter whether or not BSP is inside our - * cpupool. - * - * And since there indeed is the chance that it is not part of it, all - * we must do is remove _and_ unassign the unit from any runqueue, as - * well as updating v->processor with the target, so that the suspend - * process can continue. - * - * It will then be during resume that a new, meaningful, value for - * v->processor will be chosen, and during actual domain unpause that - * the unit will be assigned to and added to the proper runqueue. - */ - if ( unlikely(!cpumask_test_cpu(new_cpu, cpupool_domain_master_cpumask= (d))) ) - { - ASSERT(system_state =3D=3D SYS_STATE_suspend); - if ( unit_on_runq(svc) ) - { - runq_remove(svc); - update_load(ops, svc->rqd, NULL, -1, now); - } - _runq_deassign(svc); - sched_set_res(unit, get_sched_res(new_cpu)); - return; - } - - /* If here, new_cpu must be a valid Credit2 pCPU, and in our affinity.= */ ASSERT(cpumask_test_cpu(new_cpu, &csched2_priv(ops)->initialized)); ASSERT(cpumask_test_cpu(new_cpu, unit->cpu_hard_affinity)); =20 --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel