All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] [PATCH] psos skin: time_slice is specified in ticks instead of ns
@ 2013-03-15 14:52 Ronny Meeus
  2013-03-15 17:14 ` Ronny Meeus
  2013-03-22 18:10 ` Philippe Gerum
  0 siblings, 2 replies; 3+ messages in thread
From: Ronny Meeus @ 2013-03-15 14:52 UTC (permalink / raw)
  To: xenomai

The pSOS skin uses a default timeslice of 1000 sec.
In comments it is mentioned that the value is specified in ms
while the place where the variable is used assumes that it is
in ticks.

Rename time_slice to time_slice_in_ticks to make this clear.
Additionally, increase the timeslice from the intended 1ms
to 5ms to reduce the overhead a bit.

Signed-off-by: Ronny Meeus <ronny.meeus@gmail.com>

diff --git a/lib/psos/init.c b/lib/psos/init.c
--- a/lib/psos/init.c
+++ b/lib/psos/init.c
@@ -39,7 +39,7 @@ unsigned int psos_long_names;
 
 static unsigned int clock_resolution = 1000000; /* 1ms */
 
-static unsigned int time_slice = 1000000; /* 1ms */
+static unsigned int time_slice_in_ticks = 5;
 
 static const struct option psos_options[] = {
 	{
@@ -71,7 +71,7 @@ static int psos_parse_option(int optnum,
 		clock_resolution = atoi(optarg);
 		break;
 	case time_slice_opt:
-		time_slice = atoi(optarg);
+		time_slice_in_ticks = atoi(optarg);
 		break;
 	default:
 		/* Paranoid, can't happen. */
@@ -113,7 +113,7 @@ static int psos_init(void)
 	}
 
 	/* Convert pSOS ticks to timespec. */
-	clockobj_ticks_to_timespec(&psos_clock, time_slice, &psos_rrperiod);
+	clockobj_ticks_to_timespec(&psos_clock, time_slice_in_ticks, &psos_rrperiod);
 
 	return 0;
 }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai] [PATCH] psos skin: time_slice is specified in ticks instead of ns
  2013-03-15 14:52 [Xenomai] [PATCH] psos skin: time_slice is specified in ticks instead of ns Ronny Meeus
@ 2013-03-15 17:14 ` Ronny Meeus
  2013-03-22 18:10 ` Philippe Gerum
  1 sibling, 0 replies; 3+ messages in thread
From: Ronny Meeus @ 2013-03-15 17:14 UTC (permalink / raw)
  To: xenomai

On Fri, Mar 15, 2013 at 3:52 PM, Ronny Meeus <ronny.meeus@gmail.com> wrote:
> The pSOS skin uses a default timeslice of 1000 sec.
> In comments it is mentioned that the value is specified in ms
> while the place where the variable is used assumes that it is
> in ticks.
>
> Rename time_slice to time_slice_in_ticks to make this clear.
> Additionally, increase the timeslice from the intended 1ms
> to 5ms to reduce the overhead a bit.
>
> Signed-off-by: Ronny Meeus <ronny.meeus@gmail.com>
>
> diff --git a/lib/psos/init.c b/lib/psos/init.c
> --- a/lib/psos/init.c
> +++ b/lib/psos/init.c
> @@ -39,7 +39,7 @@ unsigned int psos_long_names;
>
>  static unsigned int clock_resolution = 1000000; /* 1ms */
>
> -static unsigned int time_slice = 1000000; /* 1ms */
> +static unsigned int time_slice_in_ticks = 5;
>
>  static const struct option psos_options[] = {
>         {
> @@ -71,7 +71,7 @@ static int psos_parse_option(int optnum,
>                 clock_resolution = atoi(optarg);
>                 break;
>         case time_slice_opt:
> -               time_slice = atoi(optarg);
> +               time_slice_in_ticks = atoi(optarg);
>                 break;
>         default:
>                 /* Paranoid, can't happen. */
> @@ -113,7 +113,7 @@ static int psos_init(void)
>         }
>
>         /* Convert pSOS ticks to timespec. */
> -       clockobj_ticks_to_timespec(&psos_clock, time_slice, &psos_rrperiod);
> +       clockobj_ticks_to_timespec(&psos_clock, time_slice_in_ticks, &psos_rrperiod);
>
>         return 0;
>  }

To be clear, this is a patch for the xenomai forge repository.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai] [PATCH] psos skin: time_slice is specified in ticks instead of ns
  2013-03-15 14:52 [Xenomai] [PATCH] psos skin: time_slice is specified in ticks instead of ns Ronny Meeus
  2013-03-15 17:14 ` Ronny Meeus
@ 2013-03-22 18:10 ` Philippe Gerum
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Gerum @ 2013-03-22 18:10 UTC (permalink / raw)
  To: Ronny Meeus; +Cc: xenomai

On 03/15/2013 03:52 PM, Ronny Meeus wrote:
> The pSOS skin uses a default timeslice of 1000 sec.
> In comments it is mentioned that the value is specified in ms
> while the place where the variable is used assumes that it is
> in ticks.
>
> Rename time_slice to time_slice_in_ticks to make this clear.
> Additionally, increase the timeslice from the intended 1ms
> to 5ms to reduce the overhead a bit.
>
> Signed-off-by: Ronny Meeus <ronny.meeus@gmail.com>

Merged to the staging branch, on its way to mainline, thanks.

http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=eaef61542ff3ec37d40de84361d69ec309840d0a

-- 
Philippe.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-22 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-15 14:52 [Xenomai] [PATCH] psos skin: time_slice is specified in ticks instead of ns Ronny Meeus
2013-03-15 17:14 ` Ronny Meeus
2013-03-22 18:10 ` Philippe Gerum

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.