[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240510111822405PCAy6fW8F_-AfMPoCfT8u@zte.com.cn>
Date: Fri, 10 May 2024 11:18:22 +0800 (CST)
From: <cheng.lin130@....com.cn>
To: <seanjc@...gle.com>
Cc: <pbonzini@...hat.com>, <kvm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <jiang.yong5@....com.cn>,
<wang.liang82@....com.cn>, <jiang.xuexin@....com.cn>
Subject: Re: [PATCH] KVM: introduce vm's max_halt_poll_ns to debugfs
> > > From: seanjc <seanjc@...gle.com>
> > > > From: Cheng Lin <cheng.lin130@....com.cn>
> > > >
> > > > Introduce vm's max_halt_poll_ns and override_halt_poll_ns to
> > > > debugfs. Provide a way to check and modify them.
> > > Why?
> > If a vm's max_halt_poll_ns has been set using KVM_CAP_HALT_POLL,
> > the module parameter kvm.halt_poll.ns will no longer indicate the maximum
> > halt pooling interval for that vm. After introducing these two attributes into
> > debugfs, it can be used to check whether the individual configuration of the
> > vm is enabled and the working value.
> But why is max_halt_poll_ns special enough to warrant debugfs entries? There is
> a _lot_ of state in KVM that is configurable per-VM, it simply isn't feasible to
> dump everything into debugfs.
If we want to provide a directly modification interface under /sys for per-vm
max_halt_poll_ns, like module parameter /sys/module/kvm/parameters/halt_poll_ns,
using debugfs may be worth.
Further, if the override_halt_poll_ns under debugfs is set to be writable, it can even
achieve the setting of per-vm max_halt_poll_ns, as the KVM_CAP_HALL_POLL interface
does.
> I do think it would be reasonable to capture the max allowed polling time in
> the existing tracepoint though, e.g.
Yes, I agree it.
It is sufficient to get per-vm max_halt_poll_ns through tracepoint if KVP_CAP_HALL_POLL
is used as the unique setting interface.
Do you consider it is worth to provide a setting interface other than KVP_CAP_HALL_POLL?
Powered by blists - more mailing lists