All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Russell Johnson <russell.johnson@kratosdefense.com>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [External] - Re: In-band Context Switch on oob_ioctl() call
Date: Mon, 21 Feb 2022 18:32:29 +0100	[thread overview]
Message-ID: <87tucsf7l2.fsf@xenomai.org> (raw)
In-Reply-To: <PH1P110MB10505DB6F9F0B40F4C9DB93CE23A9@PH1P110MB1050.NAMP110.PROD.OUTLOOK.COM>


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.


      reply	other threads:[~2022-02-21 17:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=87tucsf7l2.fsf@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=russell.johnson@kratosdefense.com \
    --cc=xenomai@xenomai.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.