From nobody Mon Feb 9 17:36:56 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.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 (zoho.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=1568451264; cv=none; d=zoho.com; s=zohoarc; b=I60PaCfMxcXYnnOoOB6GQ/ysxrfD6YUe5vQ1j+U27/YC8vUicb5WJRJW5rJyz8ZPiXE4nwrZxMaoYop7ozXFMn3TQkQQ420D0gRy+3nfIWd2xIYouDS2igHDUKu+Mx2wUps9OcYQuz+qCY9PSVA/6BAAoUM3y05y0J3/p9pbPeU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568451264; 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:ARC-Authentication-Results; bh=ghxsTF/+Qdz57oKGolny38yT8poggJJmKMv9YImTRGQ=; b=mHE2/tPz9DMiJnfg+IGH3Tn0KNEfzMm3cCPNiIHvakRK8chpKXgnTi/qogi/n6qZ4EI58L1G+ab8eBfpH2QZdW+p88Pb+y4JhT1o3lzTmm5JxYoyDHJjlvIC6aXXN+fff3lMHV9fZ91RuuUQXXRDz1rCjLipfldznzqX3k3RBaM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.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 1568451264852830.6144375732422; Sat, 14 Sep 2019 01:54:24 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i93oP-0008Ic-8Y; Sat, 14 Sep 2019 08:53:45 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i93oN-0008Fq-Lk for xen-devel@lists.xenproject.org; Sat, 14 Sep 2019 08:53:43 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 0edef4fd-d6cd-11e9-95c1-12813bfff9fa; Sat, 14 Sep 2019 08:53:02 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A4BF6AFE8; Sat, 14 Sep 2019 08:53:00 +0000 (UTC) X-Inumbo-ID: 0edef4fd-d6cd-11e9-95c1-12813bfff9fa X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Sat, 14 Sep 2019 10:52:23 +0200 Message-Id: <20190914085251.18816-20-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190914085251.18816-1-jgross@suse.com> References: <20190914085251.18816-1-jgross@suse.com> Subject: [Xen-devel] [PATCH v3 19/47] xen: add sched_unit_pause_nosync() and sched_unit_unpause() 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 , Tim Deegan , Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Dario Faggioli , Julien Grall , Jan Beulich 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" The credit scheduler calls vcpu_pause_nosync() and vcpu_unpause() today. Add sched_unit_pause_nosync() and sched_unit_unpause() to perform the same operations on scheduler units instead. Signed-off-by: Juergen Gross --- xen/common/sched_credit.c | 6 +++--- xen/include/xen/sched-if.h | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c index 044b1d8a51..dcaa9f9557 100644 --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -1065,7 +1065,7 @@ csched_unit_remove(const struct scheduler *ops, struc= t sched_unit *unit) if ( test_and_clear_bit(CSCHED_FLAG_UNIT_PARKED, &svc->flags) ) { SCHED_STAT_CRANK(unit_unpark); - vcpu_unpause(svc->unit->vcpu_list); + sched_unit_unpause(svc->unit); } =20 spin_lock_irq(&prv->lock); @@ -1515,7 +1515,7 @@ csched_acct(void* dummy) !test_and_set_bit(CSCHED_FLAG_UNIT_PARKED, &svc->flag= s) ) { SCHED_STAT_CRANK(unit_park); - vcpu_pause_nosync(svc->unit->vcpu_list); + sched_unit_pause_nosync(svc->unit); } =20 /* Lower bound on credits */ @@ -1539,7 +1539,7 @@ csched_acct(void* dummy) * if it is woken up here. */ SCHED_STAT_CRANK(unit_unpark); - vcpu_unpause(svc->unit->vcpu_list); + sched_unit_unpause(svc->unit); clear_bit(CSCHED_FLAG_UNIT_PARKED, &svc->flags); } =20 diff --git a/xen/include/xen/sched-if.h b/xen/include/xen/sched-if.h index d624b81e53..b5967d26af 100644 --- a/xen/include/xen/sched-if.h +++ b/xen/include/xen/sched-if.h @@ -432,6 +432,16 @@ static inline int sched_adjust_cpupool(const struct sc= heduler *s, return s->adjust_global ? s->adjust_global(s, op) : 0; } =20 +static inline void sched_unit_pause_nosync(struct sched_unit *unit) +{ + vcpu_pause_nosync(unit->vcpu_list); +} + +static inline void sched_unit_unpause(struct sched_unit *unit) +{ + vcpu_unpause(unit->vcpu_list); +} + #define REGISTER_SCHEDULER(x) static const struct scheduler *x##_entry \ __used_section(".data.schedulers") =3D &x; =20 --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel