From nobody Mon Feb 9 09:16:23 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=1557125914; cv=none; d=zoho.com; s=zohoarc; b=MLSOYk6/Rq4GfrCRrWedyyV9pXUaH0LmffINeoVIz4Ncmuaz0pinNDZ3HECMCdRaJmN07HdR05mutU3g1VTkeUyyMkQ9pnxb4bUbzWkZaUJ49cvdmiUjzErRxWUgx9KAmz3KIa5cNn7NjxgB10GB3BtXDGi2/jroUM+x8rvC+go= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557125914; 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=pYRVsJjIxM5mkPwNlLYOrPthOa5WvaEFrVZ5LIEufak=; b=R8eMXHInPWGmJBQalyao/z3F+Lf4Kb2aZKxqywmGhprMEA1y6zoqS3UFR0IPU4ZdcYrwgOHy+bZl4GdxfjpaFx5r91qXlbvxJGkRgq/F1apKsVIQCUkRuIG4PcStV2AvovyIjsZuYcLFTLOkpe7x71K4cp5SuxcAkSJDniMibH4= 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 1557125914715415.16252708933223; Sun, 5 May 2019 23:58:34 -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 1hNXYg-00024q-B5; Mon, 06 May 2019 06:57:06 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hNXYd-0001yH-95 for xen-devel@lists.xenproject.org; Mon, 06 May 2019 06:57:03 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 2508aaf4-6fcc-11e9-843c-bc764e045a96; Mon, 06 May 2019 06:57:00 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DE197AF24; Mon, 6 May 2019 06:56:54 +0000 (UTC) X-Inumbo-ID: 2508aaf4-6fcc-11e9-843c-bc764e045a96 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Mon, 6 May 2019 08:56:22 +0200 Message-Id: <20190506065644.7415-24-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190506065644.7415-1-jgross@suse.com> References: <20190506065644.7415-1-jgross@suse.com> Subject: [Xen-devel] [PATCH RFC V2 23/45] xen: add sched_item_pause_nosync() and sched_item_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_item_pause_nosync() and sched_item_unpause() to perform the same operations on scheduler items 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 babccb69f7..9db5c3fc71 100644 --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -1080,7 +1080,7 @@ csched_item_remove(const struct scheduler *ops, struc= t sched_item *item) if ( test_and_clear_bit(CSCHED_FLAG_ITEM_PARKED, &svc->flags) ) { SCHED_STAT_CRANK(item_unpark); - vcpu_unpause(svc->item->vcpu); + sched_item_unpause(svc->item); } =20 spin_lock_irq(&prv->lock); @@ -1530,7 +1530,7 @@ csched_acct(void* dummy) !test_and_set_bit(CSCHED_FLAG_ITEM_PARKED, &svc->flag= s) ) { SCHED_STAT_CRANK(item_park); - vcpu_pause_nosync(svc->item->vcpu); + sched_item_pause_nosync(svc->item); } =20 /* Lower bound on credits */ @@ -1554,7 +1554,7 @@ csched_acct(void* dummy) * if it is woken up here. */ SCHED_STAT_CRANK(item_unpark); - vcpu_unpause(svc->item->vcpu); + sched_item_unpause(svc->item); } =20 /* Upper bound on credits means ITEM stops earning */ diff --git a/xen/include/xen/sched-if.h b/xen/include/xen/sched-if.h index 295101f9ef..65e2c3bba8 100644 --- a/xen/include/xen/sched-if.h +++ b/xen/include/xen/sched-if.h @@ -451,6 +451,16 @@ static inline int sched_adjust_cpupool(const struct sc= heduler *s, return 0; } =20 +static inline void sched_item_pause_nosync(struct sched_item *item) +{ + vcpu_pause_nosync(item->vcpu); +} + +static inline void sched_item_unpause(struct sched_item *item) +{ + vcpu_unpause(item->vcpu); +} + #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