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

Re: kernel BUG around vmap/vfree - xen_enter_lazy_mmu()/xen_leave_lazy_mmu() - Linux 7.0-rc1



On 08/05/2026 12:09, Jürgen Groß wrote:
>
> OTOH I don't like the multiple conditions used for testing
> (state->enable_count,
> TIF_LAZY_MMU_UPDATES, xen_lazy_mode).
>
> Another variant would be to just let the Xen specific code tolerate
> the double
> calls by disabling preemption in the Xen code and checking via
> __task_lazy_mmu_mode_active() if anything needs to be done.
>
> I'd really like to get rid of xen_lazy_mode completely.

That certainly crossed my mind, but I didn't feel qualified to perform
that kind of surgery, especially considering XEN_LAZY_CPU. There is
presumably a good reason to track this one via a percpu variable, but
for the MMU side it feels like this creates more problems than it
solves. Maybe it is possible to keep XEN_LAZY_CPU untouched while
removing XEN_LAZY_MMU and using is_lazy_mmu_mode_active() instead? If we
do that, I don't think preemption is a concern - the lazy MMU mode is
only relevant for current and cannot be used in interrupt context.

- Kevin



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.