* In-band Context Switch on oob_ioctl() call
@ 2022-02-18 18:24 Russell Johnson
2022-02-19 15:29 ` Philippe Gerum
0 siblings, 1 reply; 4+ messages in thread
From: Russell Johnson @ 2022-02-18 18:24 UTC (permalink / raw)
To: xenomai
Hello,
I have added the oob_ioctl file descriptor to my driver, and I have made sure that I call the necessary evl functions in the open() function in the driver as well. I have a test app in userspace that is simply opening the driver and issuing an oob_ioctl every second. What I am seeing in the output from "evl ps -l" is that the "ISW" and "CTXSW" fields are incrementing with every oob_ioctl call. I added in the O_OOB flag to my open call, and I am still seeing the same behavior. I don't get why it would be switching to in-band every time the oob_ioctl() is called. Any ideas on what I could be doing wrong?
Thanks,
Russell
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: In-band Context Switch on oob_ioctl() call
2022-02-18 18:24 In-band Context Switch on oob_ioctl() call Russell Johnson
@ 2022-02-19 15:29 ` Philippe Gerum
2022-02-21 15:25 ` [External] - " Russell Johnson
0 siblings, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2022-02-19 15:29 UTC (permalink / raw)
To: Russell Johnson; +Cc: xenomai
Russell Johnson via Xenomai <xenomai@xenomai.org> writes:
> Hello,
>
> I have added the oob_ioctl file descriptor to my driver, and I have
> made sure that I call the necessary evl functions in the open()
> function in the driver as well. I have a test app in userspace that is
> simply opening the driver and issuing an oob_ioctl every second. What
> I am seeing in the output from "evl ps -l" is that the "ISW" and
> "CTXSW" fields are incrementing with every oob_ioctl call. I added in
> the O_OOB flag to my open call, and I am still seeing the same
> behavior. I don't get why it would be switching to in-band every time
> the oob_ioctl() is called. Any ideas on what I could be doing wrong?
>
> Thanks,
> Russell
It looks like the calling thread is undergoing the so-called weak
scheduling policy, see [1].
[1] https://evlproject.org/core/user-api/scheduling/#SCHED_WEAK
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [External] - Re: In-band Context Switch on oob_ioctl() call
2022-02-19 15:29 ` Philippe Gerum
@ 2022-02-21 15:25 ` Russell Johnson
2022-02-21 17:32 ` Philippe Gerum
0 siblings, 1 reply; 4+ messages in thread
From: Russell Johnson @ 2022-02-21 15:25 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai
I verified this, and the thread is under the FIFO scheduling policy.
CPU PID SCHED PRIO ISW CTXSW SYS RWA STAT TIMEOUT %CPU CPUTIME NAME
9 12344 fifo 98 14 14 14 0 X - 0.0 00:000.289 evl_dma_thread:12100
- Russell
-----Original Message-----
From: Philippe Gerum <rpm@xenomai.org>
Sent: Saturday, February 19, 2022 8:29 AM
To: Russell Johnson <russell.johnson@kratosdefense.com>
Cc: xenomai@xenomai.org
Subject: [External] - Re: In-band Context Switch on oob_ioctl() call
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Russell Johnson via Xenomai <xenomai@xenomai.org> writes:
> Hello,
>
> I have added the oob_ioctl file descriptor to my driver, and I have
> made sure that I call the necessary evl functions in the open()
> function in the driver as well. I have a test app in userspace that is
> simply opening the driver and issuing an oob_ioctl every second. What
> I am seeing in the output from "evl ps -l" is that the "ISW" and
> "CTXSW" fields are incrementing with every oob_ioctl call. I added in
> the O_OOB flag to my open call, and I am still seeing the same
> behavior. I don't get why it would be switching to in-band every time
> the oob_ioctl() is called. Any ideas on what I could be doing wrong?
>
> Thanks,
> Russell
It looks like the calling thread is undergoing the so-called weak scheduling policy, see [1].
[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__evlproject.org_core_user-2Dapi_scheduling_-23SCHED-5FWEAK&d=DwIBAg&c=zeCCs5WLaN-HWPHrpXwbFoOqeS0G3NH2_2IQ_bzV13g&r=-WrlDvHLmZCY7pl-EOIRaJl9uZvKbG-G8KkkUcIDh2F7Jr6SYxS_pdf-orjkExnI&m=0Ytm_g4N1lnCdUHifknw-Mckrpzq2gJlG2oKvQ543DBHhDfXPgbp5TWf-00etMCB&s=HKJUpkhAExaAqj5CUY7bze1EqRKRy8x6RHRKCl4OWH4&e=
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [External] - Re: In-band Context Switch on oob_ioctl() call
2022-02-21 15:25 ` [External] - " Russell Johnson
@ 2022-02-21 17:32 ` Philippe Gerum
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2022-02-21 17:32 UTC (permalink / raw)
To: Russell Johnson; +Cc: xenomai
Russell Johnson <russell.johnson@kratosdefense.com> writes:
> I verified this, and the thread is under the FIFO scheduling policy.
>
> CPU PID SCHED PRIO ISW CTXSW SYS RWA STAT TIMEOUT %CPU CPUTIME NAME
> 9 12344 fifo 98 14 14 14 0 X - 0.0 00:000.289 evl_dma_thread:12100
>
^^^
Means "relaxed", in-band mode. So the thread does switch out of oob mode
voluntarily for some reason.
> - Russell
>
> -----Original Message-----
> From: Philippe Gerum <rpm@xenomai.org>
> Sent: Saturday, February 19, 2022 8:29 AM
> To: Russell Johnson <russell.johnson@kratosdefense.com>
> Cc: xenomai@xenomai.org
> Subject: [External] - Re: In-band Context Switch on oob_ioctl() call
>
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> Russell Johnson via Xenomai <xenomai@xenomai.org> writes:
>
>> Hello,
>>
>> I have added the oob_ioctl file descriptor to my driver, and I have
>> made sure that I call the necessary evl functions in the open()
>> function in the driver as well. I have a test app in userspace that is
>> simply opening the driver and issuing an oob_ioctl every second. What
>> I am seeing in the output from "evl ps -l" is that the "ISW" and
>> "CTXSW" fields are incrementing with every oob_ioctl call. I added in
>> the O_OOB flag to my open call, and I am still seeing the same
>> behavior. I don't get why it would be switching to in-band every time
>> the oob_ioctl() is called. Any ideas on what I could be doing wrong?
>>
>> Thanks,
>> Russell
>
> It looks like the calling thread is undergoing the so-called weak scheduling policy, see [1].
>
> [1] https://urldefense.proofpoint.com/v2/url?u=https-3A__evlproject.org_core_user-2Dapi_scheduling_-23SCHED-5FWEAK&d=DwIBAg&c=zeCCs5WLaN-HWPHrpXwbFoOqeS0G3NH2_2IQ_bzV13g&r=-WrlDvHLmZCY7pl-EOIRaJl9uZvKbG-G8KkkUcIDh2F7Jr6SYxS_pdf-orjkExnI&m=0Ytm_g4N1lnCdUHifknw-Mckrpzq2gJlG2oKvQ543DBHhDfXPgbp5TWf-00etMCB&s=HKJUpkhAExaAqj5CUY7bze1EqRKRy8x6RHRKCl4OWH4&e=
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-21 17:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-18 18:24 In-band Context Switch on oob_ioctl() call Russell Johnson
2022-02-19 15:29 ` Philippe Gerum
2022-02-21 15:25 ` [External] - " Russell Johnson
2022-02-21 17:32 ` 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.