On 07/20/22 11:29, Richard W.M. Jones wrote: > On Wed, Jul 20, 2022 at 11:23:14AM +0200, Laszlo Ersek wrote: >> I think we could modify libguestfs to test "setfiles" for the "-T" >> option -- with setfiles_has_option() --, and if it's present, pass "-T >> 0". However, for that to be actually useful, we'd need to start up the >> appliance with multiple VCPUs -- using guestfs_set_smp(). > > For virt-v2v we actually do this already: > > https://github.com/libguestfs/virt-v2v/blob/2fbd578b4e6884a23063ad67ee36f02c4eb6c668/convert/convert.ml#L58 > > It's pretty much required for dracut to finish in a reasonable time. > >> ... Apparently, virt-customize already exposes an "--smp" option for >> that, so we might get away with modifying libguestfs only. > > Right, for the other tools users would need to add --smp to get the > benefits, but AIUI there's no drawback to using -T 0 even if running > on a single core? I think that's correct, yes. It should cause selinux_restorecon_parallel() to call selinux_restorecon_common() with the thread count set to 1 from the "nthreads" parameter, rather than selinux_restorecon() calling the same common function with the thread count set from the open-coded constant 1. Laszlo _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure