Re: [PATCH v2 9/9] qemu: Place helper processes into the same trusted group

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

 



On Wed, 2022-07-13 at 17:25 +0100, Daniel P. Berrangé wrote:
> It would need to use SCOPE_THREAD_GROUP, except even that is not
> sufficient
> as the helper may have fork+exec'd another helper by this point, and
> our
> call will only affect the first process.
> 
> IOW, to set core scheduling cookies on the helpers, we need to set
> them
> upfront at the time we spawn the helper.
> 
> IOW, during startup, IIUC, we need to fork  a dummy process solely to
> call PR_SCHED_CORE_CREATE. Then when forking anything else, whether a
> helper, or QEMU itself, we need to pull the cookie from that dummy
> process, and then finally kill that dummy process.
> 
Yes. Not pretty, but if forks are involved, that's the solution, I
think.

An alternative would be to create/pull the cookie in the main process
(the one that forks all the helpers), then do fork all helpers, and
then "clear" the cookie for it.

But I guess that would be even worse...

Regards
-- 
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux