From: Nate Studer <nate.studer@dornerworks.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Robert VanVossen <robert.vanvossen@dornerworks.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 2/3] arinc: Add cpu-pool support to scheduler.
Date: Tue, 19 Nov 2013 08:58:49 -0500 [thread overview]
Message-ID: <528B6E99.8090707@dornerworks.com> (raw)
In-Reply-To: <528B3DBA.9020802@citrix.com>
On 11/19/2013 5:30 AM, Andrew Cooper wrote:
>>
>> @@ -380,7 +369,9 @@ a653sched_deinit(const struct scheduler *ops)
>> static void *
>> a653sched_alloc_vdata(const struct scheduler *ops, struct vcpu *vc, void *dd)
>> {
>> + a653sched_priv_t *sched_priv = SCHED_PRIV(ops);
>> arinc653_vcpu_t *svc;
>> + int entry;
>
> sched_priv->num_schedule_entries is inconsistently used as signed and
> unsigned. It should be an unsigned value, and updated to be so
> everywhere, including in the a653sched_priv_t structure.
>
Right, this inconsistency should be fixed.
>>
>> /*
>> * Allocate memory for the ARINC 653-specific scheduler data information
>> @@ -390,6 +381,19 @@ a653sched_alloc_vdata(const struct scheduler *ops, struct vcpu *vc, void *dd)
>> if ( svc == NULL )
>> return NULL;
>>
>> + /* add every one of dom0's vcpus to the schedule */
>> + if (vc->domain->domain_id == 0)
>
> Xen style would include spaces immediately inside the brackets.
>
> Also, it looks like you could do with a bounds check against
> ARINC653_MAX_DOMAINS_PER_SCHEDULE before trying to put another dom0 into
> the mix.
Will add bounds checking.
>> /**
>> @@ -538,8 +542,13 @@ a653sched_do_schedule(
>> static int sched_index = 0;
>> static s_time_t next_switch_time;
>> a653sched_priv_t *sched_priv = SCHED_PRIV(ops);
>> + const int cpu = smp_processor_id();
>
> This should be an unsigned int.
Yes it should. This needs to be fixed in pick_cpu as well.
>
>>
>> - if ( now >= sched_priv->next_major_frame )
>> + if ( sched_priv->num_schedule_entries < 1 )
>> + {
>> + sched_priv->next_major_frame = now + DEFAULT_TIMESLICE;
>> + }
>
> Xen style would require these braces to be omitted.
Even when followed by a multiple statement "else if"? I see braces in the same
construct in the credit scheduler.
if ( list_empty(&svc->active_vcpu_elem) )
{
__csched_vcpu_acct_start(prv, svc);
}
else if ( _csched_cpu_pick(ops, current, 0) != cpu )
{
I have no problem changing it, since I want to avoid spreading styling
inconsistencies, but I just want to make sure.
>
>> + else if ( now >= sched_priv->next_major_frame )
>> {
>> /* time to enter a new major frame
>> * the first time this function is called, this will be true */
The remaining comments are style comments, which I will fix up in the next
version of the patch.
Nate
next prev parent reply other threads:[~2013-11-19 13:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 20:16 [PATCH 0/3] arinc: Implement cpu-pool support Nathan Studer
2013-11-18 20:16 ` [PATCH 1/3] arinc: whitespace and formatting fixes Nathan Studer
2013-11-19 9:54 ` Andrew Cooper
2013-11-19 11:30 ` George Dunlap
2013-11-18 20:16 ` [PATCH 2/3] arinc: Add cpu-pool support to scheduler Nathan Studer
2013-11-19 10:30 ` Andrew Cooper
2013-11-19 11:18 ` George Dunlap
2013-11-19 11:33 ` Andrew Cooper
2013-11-19 13:01 ` Nate Studer
2013-11-19 13:58 ` Nate Studer [this message]
2013-11-19 14:04 ` Nate Studer
2013-11-19 18:16 ` Andrew Cooper
2013-11-19 11:30 ` George Dunlap
2013-11-18 20:16 ` [PATCH 3/3] arinc: Add poolid parameter to scheduler get/set functions Nathan Studer
2013-11-19 10:32 ` Andrew Cooper
2013-11-19 11:32 ` George Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=528B6E99.8090707@dornerworks.com \
--to=nate.studer@dornerworks.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=robert.vanvossen@dornerworks.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.