Skip to contentSkip to conversation

libxl: libxl_domain_sched_params_set case for ARINC 653 scheduler

PATCH Applied Andrew Kane 3 participants 6 messages Jul 25, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 libxl: libxl_domain_sched_params_set case for ARINC 653 scheduler

Implements sched_arinc653_domain_set to match the existing API. Currently, there is no domain-specific configuration when using the ARINC 653 scheduler, so we simply return success.

---
Changed since v1:
* changed comment to C-style (/* */)

tools/libxl/libxl.c +11 -0
diff -r 4a28c496acbf -r c6d90859a30a tools/libxl/libxl.c
@@ -3642,6 +3642,14 @@ libxl_scheduler libxl_get_scheduler(libx
     return sched;
 }
 
+static int sched_arinc653_domain_set(libxl__gc *gc, uint32_t domid,
+                                     const libxl_domain_sched_params *scinfo)
+{
+    /* Currently, the ARINC 653 scheduler does not take any domain-specific
+         configuration, so we simply return success. */
+    return 0;
+}
+
 static int sched_credit_domain_get(libxl__gc *gc, uint32_t domid,
                                    libxl_domain_sched_params *scinfo)
 {
@@ -3909,6 +3917,9 @@ int libxl_domain_sched_params_set(libxl_
     case LIBXL_SCHEDULER_CREDIT2:
         ret=sched_credit2_domain_set(gc, domid, scinfo);
         break;
+    case LIBXL_SCHEDULER_ARINC653:
+        ret=sched_arinc653_domain_set(gc, domid, scinfo);
+        break;
     default:
         LOG(ERROR, "Unknown scheduler");
         ret=ERROR_INVAL;
Acked-by on v2 1/1
#1 lore raw
Quoted 5 lines · Andrew Kane

Implements sched_arinc653_domain_set to match the existing API. Currently, there is no domain-specific configuration when using the ARINC 653 scheduler, so we simply return success.

There's no need for an equivalent in the get path like Dario suggested?

Quoted 33 lines

---
Changed since v1:
* changed comment to C-style (/* */)

diff -r 4a28c496acbf -r c6d90859a30a tools/libxl/libxl.c

tools/libxl/libxl.c +11 -0
@@ -3642,6 +3642,14 @@ libxl_scheduler libxl_get_scheduler(libx
     return sched;
 }
 
+static int sched_arinc653_domain_set(libxl__gc *gc, uint32_t domid,
+                                     const libxl_domain_sched_params *scinfo)
+{
+    /* Currently, the ARINC 653 scheduler does not take any domain-specific
+         configuration, so we simply return success. */
+    return 0;
+}
+
 static int sched_credit_domain_get(libxl__gc *gc, uint32_t domid,
                                    libxl_domain_sched_params *scinfo)
 {
@@ -3909,6 +3917,9 @@ int libxl_domain_sched_params_set(libxl_
     case LIBXL_SCHEDULER_CREDIT2:
         ret=sched_credit2_domain_set(gc, domid, scinfo);
         break;
+    case LIBXL_SCHEDULER_ARINC653:
+        ret=sched_arinc653_domain_set(gc, domid, scinfo);
+        break;
     default:
         LOG(ERROR, "Unknown scheduler");
         ret=ERROR_INVAL;
Applied
#2 lore raw
Quoted 10 lines · Ian Campbell
Quoted 5 lines · Andrew Kane

Implements sched_arinc653_domain_set to match the existing API. Currently, there is no domain-specific configuration when using the ARINC 653 scheduler, so we simply return success.

There's no need for an equivalent in the get path like Dario suggested?

Applied, please send the get one separately if it is needed.

#3 lore raw
In reply to Andrew Kane
Quoted 6 lines · Andrew Kane

Implements sched_arinc653_domain_set to match the existing API. Currently, there is no domain-specific configuration when using the ARINC 653 scheduler, so we simply return success.

Hi again Andrew,

Quoted 5 lines

static int sched_credit_domain_get(libxl__gc *gc, uint32_t domid,
libxl_domain_sched_params *scinfo)
{

tools/libxl/libxl.c int libxl_domain_sched_params_set(libxl_ · line 3925

Quoted 9 lines
tools/libxl/libxl.c +3 -0
@@ -3909,6 +3917,9 @@ int libxl_domain_sched_params_set(libxl_
     case LIBXL_SCHEDULER_CREDIT2:
         ret=sched_credit2_domain_set(gc, domid, scinfo);
         break;
+    case LIBXL_SCHEDULER_ARINC653:
+        ret=sched_arinc653_domain_set(gc, domid, scinfo);
+        break;
     default:
         LOG(ERROR, "Unknown scheduler");
         ret=ERROR_INVAL;

I don't know if you've seen it, as I said it in my second e-mail, while replying to you, so I'm asking here again. Is it ok that you need to do this for libxl_domain_sched_params_set() bit *NOT* for libxl_domain_sched_params_get()? If it is, sorry for bothering... If not, you probably should add that too. :-)

To me it seems it could be needed, but it might well be me not knowing enough of ARINC's interface. :-P

Thanks and Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw

Dario and Ian,

Quoted 20 lines · Dario Faggioli
Quoted 6 lines · Andrew Kane

Implements sched_arinc653_domain_set to match the existing API. Currently, there is no domain-specific configuration when using the ARINC 653 scheduler, so we simply return success.

Hi again Andrew,

Quoted 11 lines

static int sched_credit_domain_get(libxl__gc *gc, uint32_t domid,
libxl_domain_sched_params *scinfo)
{

tools/libxl/libxl.c +3 -0
@@ -3909,6 +3917,9 @@ int libxl_domain_sched_params_set(libxl_
    case LIBXL_SCHEDULER_CREDIT2:
        ret=sched_credit2_domain_set(gc, domid, scinfo);
        break;
+    case LIBXL_SCHEDULER_ARINC653:
+        ret=sched_arinc653_domain_set(gc, domid, scinfo);
+        break;
    default:
Quoted 8 lines

tools/libxl/libxl.c int libxl_domain_sched_params_set(libxl_ · line 3925

Quoted 3 lines
tools/libxl/libxl.c +0 -0
        LOG(ERROR, "Unknown scheduler");
        ret=ERROR_INVAL;

I don't know if you've seen it, as I said it in my second e-mail, while replying to you, so I'm asking here again. Is it ok that you need to do this for libxl_domain_sched_params_set() bit *NOT* for libxl_domain_sched_params_get()? If it is, sorry for bothering... If not, you probably should add that too. :-)

We would like to delay implementing libxl_domain_sched_params_get and the associated xl call structure until we have integrated our in-house configuration tool with xl. Otherwise we'd have a long call tree to nowhere and an xl subcommand that doesn't do anything. =)

Regards,
- Andrew

Quoted 13 lines

To me it seems it could be needed, but it might well be me not knowing enough of ARINC's interface. :-P

Thanks and Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
Signature · 2 lines
Andrew Kane
Computer Engineering Intern, DornerWorks Ltd.
#5 lore raw
Quoted 5 lines · Andrew Kane

We would like to delay implementing libxl_domain_sched_params_get and the associated xl call structure until we have integrated our in-house configuration tool with xl. Otherwise we'd have a long call tree to nowhere and an xl subcommand that doesn't do anything. =)

That sounds reasonable. I was only asking because, with the current code, invoking libxl_domain_sched_params_get(), with the ARINC scheduler as a parameter, would result in the call failing and in an error message saying "Unknown scheduler".

However, you're the sole users of it that I know of, so, if you're fine with that, and nobody else complains, I'm fine with it too. :-)

Thanks and Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel