[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/sched: rtds: prevent extratime priority_level wraparound


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Oleksii Moisieiev <oleksii_moisieiev@xxxxxxxx>
  • Date: Wed, 1 Apr 2026 13:42:33 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RVY3b3fWcKAQXVxPXu4SXEFjoVVDvCCE5N7bue1Qb1A=; b=uNfr2X/iX2J0Mcw1GdnthZ82FzDq++vrGB6KkXK8a9ROARs5DruuwjI7ewJFvt3arJZQ06iV8luci9m+CeOKpn7EBmvxs/SyyEyYsujsVvPKcobbVQeWrmzRaGkZsLdcBsH6htKqCi2koESR5T7hDVClunWZ8vn+SW0QKJNq6SzIK6y8XvlSuWhLZ1/dggLVTRfz9Tr8x+JMaRwF+HbdgfSBKoU0SSMXXRN3vCo85bXdTyyVNhr5SPK5uCXPZZJQyZBM/87/UEShwbxnHpdx2EWIT+IcCSyijA8R46J8h0Ani9Y8v3ukeNzH7Y1RSrS5iO/rsHqbqB0vLEIY0qlYSg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UxoSgd6yIWi3ivcRGT7578zYuyGVd3v+ORwigAe2W/+7FSY0/A/kgNn5Wr64YuKvuTVehRDd1cNd5kHeGU1k5XFqINLWjkLLHp6ZfQFAT9XPRIl9AzCBayhB2GcHf53hkxMo9zPPHzU+IE/PX8P6q8St0hSbBRw+HLNOC/dcw18jtjMNBUaC7R4B9XANEQ+sMku4EXtgjADrngDLMbEnAxiU+DqJ9sr77kKZBXvyxa/zXnaniQgjcmMKFm+SkcCjNHp7ZClIpgg1SvgRyLx4BO2+kzoJbh09yn9CjOOJIpwB927hMIAlnY8BA3rF0wKw/1AbI69MdsnXLx5wknatUg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Dario Faggioli <dfaggioli@xxxxxxxx>, George Dunlap <gwd@xxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Meng Xu <mengxu@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 01 Apr 2026 10:42:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Jan,

I have an R-b from Juergen. Should I post another version with "Fixes:"

or it could be added to the commit message during merge?

--

Oleksii

On 31/03/2026 11:10, Jan Beulich wrote:
On 31.03.2026 09:54, Oleksii Moisieiev wrote:
In RTDS, burn_budget() increments priority_level for extratime units
whenever cur_budget is exhausted. As priority_level is unsigned and was
unbounded, it could eventually overflow to 0.

A wrapped value of 0 is the highest RTDS priority, so an extratime unit
could unexpectedly regain top priority and preempt units with active
real-time reservations, violating EDF intent.

Fix this by saturating priority_level at RTDS_MAX_PRIORITY_LEVEL instead
of incrementing unconditionally. Budget refill semantics are unchanged.

Normal behavior is unchanged. Once saturated, priority_level remains at
the lowest priority until the next period update resets it.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@xxxxxxxx>
 From the description, this looks to want to have a Fixes: tag added.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.