Re: [PATCH] x86/mm/pat: take cpa_lock around large-page collapse

From: Mike Rapoport

Date: Sat Jul 11 2026 - 04:47:26 EST


On Fri, Jul 10, 2026 at 10:15:54AM -0700, Dave Hansen wrote:
> cpa_collapse_large_pages() seems to be a never ending source of bugs.

Yeah, this one, the race with ptdump and a year old issue on Xen PV.
There might be more of course but I wouldn't call it endless.

> I'm tempted to say we should just axe it, call it a failed experiment,
> and move on with life.
>
> Is it worth keeping?

This what lets keeping executable mappings in 2M granularity. Modules,
ftrace and kprobes are already using it and BPF is on the way:

https://lore.kernel.org/bpf/20260626-execmem-x86-rox-bpf-v0-v1-0-45a0b0ed4fe9@xxxxxxxxxx/

--
Sincerely yours,
Mike.