* Re: system() instruction creates latency peaks [not found] <trinity-d772b31d-ea20-4c6d-92d9-387f0952bf76-1540308456962@3c-app-mailcom-lxa13> @ 2018-10-23 21:48 ` Jeff Epler 2018-11-08 9:53 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 2+ messages in thread From: Jeff Epler @ 2018-10-23 21:48 UTC (permalink / raw) To: verrodj; +Cc: linux-rt-users 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: system() instruction creates latency peaks 2018-10-23 21:48 ` system() instruction creates latency peaks Jeff Epler @ 2018-11-08 9:53 ` Sebastian Andrzej Siewior 0 siblings, 0 replies; 2+ messages in thread From: Sebastian Andrzej Siewior @ 2018-11-08 9:53 UTC (permalink / raw) To: Jeff Epler; +Cc: verrodj, linux-rt-users On 2018-10-23 16:48:12 [-0500], Jeff Epler wrote: > 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. The fork() makes the whole memory COW (every write access will cause a page fault, see mlock(2) man page). > Jeff Sebastian ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-08 19:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <trinity-d772b31d-ea20-4c6d-92d9-387f0952bf76-1540308456962@3c-app-mailcom-lxa13>
2018-10-23 21:48 ` system() instruction creates latency peaks Jeff Epler
2018-11-08 9:53 ` Sebastian Andrzej Siewior
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).