From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 1/2] xen: credit2: fix two s_time_t handling issues in load balancing Date: Tue, 19 Jul 2016 15:39:34 +0200 Message-ID: <1468935574.13039.195.camel@citrix.com> References: <146892985892.30642.2392453881110942183.stgit@Solace.fritz.box> <146893002307.30642.10136248649438820718.stgit@Solace.fritz.box> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5125231899053376325==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPVFQ-0000mb-AU for xen-devel@lists.xenproject.org; Tue, 19 Jul 2016 13:39:44 +0000 In-Reply-To: <146893002307.30642.10136248649438820718.stgit@Solace.fritz.box> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Anshul Makkar , George Dunlap List-Id: xen-devel@lists.xenproject.org --===============5125231899053376325== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-rhvqd3pZo3V7SguuHXIt" --=-rhvqd3pZo3V7SguuHXIt Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-07-19 at 14:07 +0200, Dario Faggioli wrote: > --- a/xen/common/sched_credit2.c > +++ b/xen/common/sched_credit2.c > @@ -656,7 +656,8 @@ __update_runq_load(const struct scheduler *ops, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0rqd->load +=3D change; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0rqd->load_last_update =3D now; > =C2=A0 > -=C2=A0=C2=A0=C2=A0=C2=A0ASSERT(rqd->avgload <=3D STIME_MAX && rqd->b_avg= load <=3D > STIME_MAX); > +=C2=A0=C2=A0=C2=A0=C2=A0/* Overflow, capable of making the load look neg= ative, must not > occur. */ > +=C2=A0=C2=A0=C2=A0=C2=A0ASSERT(rqd->avgload > 0 && rqd->b_avgload > 0); > =C2=A0 Wait! This quite obviously wants to be '>=3D 0' !! Sorry for the glaring mistake. v2 coming... Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-rhvqd3pZo3V7SguuHXIt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJXji2XAAoJEBZCeImluHPuoc8P/14UQVm3j5fb07Gza2rZMc0b CbvzEVCO08Fa3OyaHZvA3o38q+ayw+Bb/TrFcdl9HqMLo4n9jHmF/lnjLVgvN7a0 WeBQ+9/qmpfiDmNm8v+bArd3ux+X/zA8piViuFBVrvHDNrVEUW/7YsWzvYgm379i 8UTfFKxCjHgRhCNUw3olQnBizKauXHhOA9CI5njuTHibgClYFuTMw+mUJPvEk4ed XZPlIMrkTk2z1P0e2yfH9rEodvsbSt3Az3VqUvMmm8wlqZQLQJZEgVN6A1BDWFam CeAHQPO+GlNL2+l4kW5TkpFjlb6Uq8NhPdGohb6Ov1wZ7jhOwWcYL/vGzJwoKd7I pljz0ABxxnqKGA8R4cCFTQ9gEkRWQ23+p4QUYakuuYvqP91i5IA/+8KqfH4d4eIF zQ4P6/u0bSWlLF3lwb8bV5qIemCJdp/9UOV0bL0j8SVp5B7DxDUHP16nEthkD3OJ 5oY5VijrhxL76GDy1jh01DhwerUZ+2mn1SL9X+yzm5v2LPnrjyJxAno+7VuKO91C 0AJhoLhYTs9AwW4KBRL9laIfHyIg5srLYMNP/xnaYerFwlO6FIFJFQGKAPGpwZXK Aqc92yzV1FP+qGBORt9gxJ65UKOKr/GQU6XTrwLJGKLiEvZPj/VZvxxAlPhR84sA PLuWeL+yU9TkisMFx3yy =e5wg -----END PGP SIGNATURE----- --=-rhvqd3pZo3V7SguuHXIt-- --===============5125231899053376325== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============5125231899053376325==--