public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mztyvop at 0pointer dot net" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/26371] [RFE] please add clone3() wrapper (in particular the CLONE_INTO_CGROUP feature of it)
Date: Tue, 25 Aug 2020 15:07:15 +0000	[thread overview]
Message-ID: <bug-26371-131-ovBxGo2Awu@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26371-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26371

--- Comment #4 from Lennart Poettering <mztyvop at 0pointer dot net> ---
(I'd not be totally opposed to the vfork()-style stuff btw. In some cases the
child might stick around for quite a while between the clone and the execve,
because of blocking NSS or other blocking stuff, as mentioned. It's a bit of a
cow-trap due to that in particular as during boot-up we fork off a lot of these
children very quickly. I hence wondered whether to rework the logic in systemd:
instead of doing the whole shebang of service setup before execve() in the
child, maybe we should insert another binary in between, i.e. an "executor"
program that receives what it is supposed to do in JSON serialized form or so,
then does NSS and whatnot, and then finally execve()'s the final program. In
that model, we'd fork off a child and then have two execve()'s before the final
program is executed, and the "middle" program would be responsible for all the
blocking stuff. In this model having vfork() would be fine I guess (or even
posix_spawn()) given that we'd spend much less time between the vfork() and the
first execve(), and definitely nothing doing blocking IO. That all said, I am
not sure whether such a design change would actually slow us down too much,
i.e. doing two execve()'s for each invoked user binary instead of one might be
more expensive than the cow trap, dunno. So far I was too lazy to do any
peformance analysis there)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-08-25 15:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 10:24 [Bug libc/26371] New: " mztyvop at 0pointer dot net
2020-08-12 13:35 ` [Bug libc/26371] " christian.brauner at ubuntu dot com
2020-08-25 12:39 ` fweimer at redhat dot com
2020-08-25 12:46 ` christian.brauner at ubuntu dot com
2020-08-25 14:57 ` mztyvop at 0pointer dot net
2020-08-25 15:07 ` mztyvop at 0pointer dot net [this message]
2020-08-25 15:12 ` mztyvop at 0pointer dot net
2020-09-21 11:38 ` fweimer at redhat dot com
2020-09-21 12:37 ` mztyvop at 0pointer dot net
2020-09-22  9:45 ` fweimer at redhat dot com
2021-06-29 22:40 ` crrodriguez at opensuse dot org
2023-06-01 12:53 ` bluca at debian dot org
2023-06-01 13:24 ` bluca at debian dot org
2023-06-01 18:46 ` carlos at redhat dot com
2023-06-02  0:58 ` sam at gentoo dot org
2023-06-26 11:48 ` bluca at debian dot org
2023-07-03 18:52 ` adhemerval.zanella at linaro dot org
2023-07-03 19:32 ` bluca at debian dot org
2023-09-05 16:11 ` adhemerval.zanella at linaro dot org
2023-09-05 16:20 ` bluca at debian dot org
2024-02-06 10:59 ` bluca at debian dot org
2024-02-06 12:38 ` adhemerval.zanella at linaro dot org

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=bug-26371-131-ovBxGo2Awu@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).