linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Epler <jepler@unpythonic.net>
To: verrodj@uymail.com
Cc: linux-rt-users@vger.kernel.org
Subject: Re: system() instruction creates latency peaks
Date: Tue, 23 Oct 2018 16:48:12 -0500	[thread overview]
Message-ID: <20181023214812.3sqxq7w7xtnh6b2h@unpythonic.net> (raw)
In-Reply-To: <trinity-d772b31d-ea20-4c6d-92d9-387f0952bf76-1540308456962@3c-app-mailcom-lxa13>

Hi, I have experienced similar symptoms in realtime programs (LinuxCNC).
We have a control thread which sometimes does operations like system(),
and one or more realtime threads.

There, we changed from using system() to using posix_spawn and it
appears to have resolved the problem.

However, I don't have any explanation as to why this is the case.  On
the specific version of glibc I have, posix_spawn uses vfork and system
uses clone; other syscalls like rt_sigaction are taken in the system
case but not the posix_spawn case.

Jeff

       reply	other threads:[~2018-10-24  6:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <trinity-d772b31d-ea20-4c6d-92d9-387f0952bf76-1540308456962@3c-app-mailcom-lxa13>
2018-10-23 21:48 ` Jeff Epler [this message]
2018-11-08  9:53   ` system() instruction creates latency peaks Sebastian Andrzej Siewior

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=20181023214812.3sqxq7w7xtnh6b2h@unpythonic.net \
    --to=jepler@unpythonic.net \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=verrodj@uymail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).