Re: [PATCH RFC 0/9] Launching processes with io_uring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/18/25 22:33, Askar Safin wrote:
Pavel Begunkov:
At this point it raises a question why it even needs io_uring
infra? I don't think it's really helping you. E.g. why not do it
as a list of operation in a custom format instead of links? That
can be run by a single io_uring request or can even be a normal
syscall.

Makes me wonder about a different ways of handling. E.g. why should
it be run in the created task context (apart from final exec)? Can
requests be run as normal by the original task, each will take the
half created and not yet launched task as a parameter (in some form),
modify it, and the final exec would launch it?

I totally agree. I think API should look like this:

===
// This may be PID fd or something completely different
int fd = create_task ();

task_manipulate (fd, OP_CHDIR, "/");
task_manipulate (fd, OP_CLOSE, 0);
task_manipulate (fd, OP_OPEN, "/dev/null", O_RDONLY, 0666);

task_execve (fd, "/bin/true", argv, envp);
===

That's one way of doing it. The api would be nice, it'd fit into
io_uring without extra tricks, and wouldn't even hard io_uring.
Though that could take a good amount of plumbing.

I also wonder, if copying the page table is a performance problem, why
CLONE_VM + exec is not an option? It's flexible, sounds like
posix_spawn does exactly that under the hood, and people tried it
and managed to outperform posix_spawn.

--
Pavel Begunkov





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux