On Fri, Nov 1, 2024 at 6:15 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote: > I'm not opposed to letting userspace say "no debugfs for me", but I don't know > that a module param is the right way to go. It's obviously quite easy to > implement and maintain (in code), but I'm mildly concerned that it'll have limited > usefulness and/or lead to bad user experiences, e.g. because people turn off debugfs > for startup latency without entirely realizing what they're sacrificing. What are they sacrificing? :) The per-VM statistics information is also accessible without debugfs, even though kvm_stat does not support it. However I'd make the module parameter read-only, so you don't have half-and-half setups. And maybe even in this mode we should create the directory anyway to hold the vcpu%d/pid files, which are not accessible in other ways. > One potentially terrible idea would be to setup debugfs asynchronously, so that > the VM is runnable asap, but userspace still gets full debugfs information. The > two big wrinkles would be the vCPU debugfs creation and kvm_uevent_notify_change() > (or at least the STATS_PATH event) would both need to be asynchronous as well. STATS_PATH is easy because you can create the toplevel directory synchronously; same for vCPUs. I'd be willing to at least see what a patch looks like. Paolo