[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [EXTERNAL] Re: [XEN PATCH v2] xen/arinc653: fix delay in the start of major frame
- To: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Nathan Studer <Nathan.Studer@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Choi, Anderson" <Anderson.Choi@xxxxxxxxxx>
- Date: Fri, 18 Jul 2025 03:37:14 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=boeing.com; dmarc=pass action=none header.from=boeing.com; dkim=pass header.d=boeing.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector5401; 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=Oi99fy7O+Svk+CMk+PL/hw4wX/VA9GFKoYPyhUHJov4=; b=aFTE1Ur66w6dHO26Ps3Sysd9PA3bBBwMPvhpw5jVIQ2uv5XW/gkQ9TumTB1jtR01ufYfkEcwZUQCACeDJRtLHLx8Hv/sAaNAZNYRdR6zdfx43Zf6E3lv4CmYnIMTXhJtoLF5c3yDScXVqY7Inn3glgSCYWK05cse4vm/eTlhdR4zmluKSqzq9px7rCX2bDwrNRxQuSNPpN4vVpaiLwfXbI6R1UnXLQZFBh/08VMoDippRNc9T2Iw/TFYw8Qe0MRruhF9+WhVukJONKZOUynGUSB/93LvLL2HMbrmJvVgCFm3NzeTOV4U2UZNnwFx+1FxCwQjfIeEay7gYhf4QXOVfg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector5401; d=microsoft.com; cv=none; b=moCBGeA2N74VUw0C5nSSRPx1We8gLQal8bcjM/AqmG9hhbb2dajSLkobPc3SbDODUe/ewZfaIKZ9TwWOUP8ep1xjAChsP8hmyScraG6A+VnHcz9rgn9pP70UHuuA8cuwMjnSYG5pUuDVlkI0SzfS0OiPS+MA9n1HOndio3Xlsysyb2lCRW7BN20z1XmgqqY0B9LNSjaEGAGEIiKTVGR07+24EJh+PJOTLQUrVcKh3FgBEJYXK411yXd0u4TFtqLFH+Ktuf2WIi3C7D91YeFIneTUTvIP6m6p1okP9qcTsXdhF7PjJGy/k84Eq6BIKZTIJM/4jVkJnx/5OFbkY9L1lw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=boeing.com;
- Cc: "Weber (US), Matthew L" <matthew.l.weber3@xxxxxxxxxx>, "Whitehead (US), Joshua C" <joshua.c.whitehead@xxxxxxxxxx>, Stewart Hildebrand <stewart@xxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, George Dunlap <gwd@xxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxx>
- Delivery-date: Fri, 18 Jul 2025 03:37:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHb9z26goGsZ4LY30285h3BvJPydLQ3FIeggAAQ9ACAABAAAIAAA0Aw
- Thread-topic: [EXTERNAL] Re: [XEN PATCH v2] xen/arinc653: fix delay in the start of major frame
Stewart,
>>> Stewart,
>>>
>>> I appreciate your suggestion to eliminate the while loop.
>>> What about initializing major_frame and schedule[0].runtime to
>>> DEFAULT_TIMESLICE at a653sched_init() and use them until the real
>>> parameters are set as below to eliminate the if branch?
>>
>> It would make the scheduling code cleaner, but since you asked Stew I'll
> defer to him.
>
> It feels odd to index schedule[0] when num_schedule_entries may be zero...
> But since it's a fixed size array and element 0 is guaranteed to exist I don't
> have a strong preference.
>
Thanks for your feedback.
If you don't have a strong preference, let me write a v3 patch with the
following change.
/* Switch to next major frame directly eliminating the use of loop */
if ( now >= sched_priv->next_major_frame )
{
s_time_t major_frame = sched_priv->major_frame;
s_time_t remainder = (now - sched_priv->next_major_frame) % major_frame;
/* major_frame and schedule[0].runtime contain DEFAULT_TIMESLICE
* if num_schedule_entries is zero.
*/
sched_priv->sched_index = 0;
sched_priv->next_major_frame = now - remainder + major_frame;
sched_priv->next_switch_time = now - remainder +
sched_priv->schedule[0].runtime;
}
/* Switch minor frame */
while ( (now >= sched_priv->next_switch_time) &&
I'll also include the "Fixes" tag you mentioned in the previous comment.
Fixes: 22787f2e107c ("ARINC 653 scheduler")
Thanks,
Anderson
|