On Tue, 12 Nov 2024 at 07:36, Christian Brauner <brauner@xxxxxxxxxx> wrote: > > Hey Linus, > > I think the original fix was buggy but then again my knowledge of > highmem isn't particularly detailed. Compile tested only. If correct, I > would ask you to please apply it directly. No, I think the original fix was fine. As Hugh says, the "PageHighMem(page)" test is valid for the whole folio, even if there are multiple pages. It's not some kind of flag that changes dynamically per page, and a folio that spans from lowmem to highmem would be insane. So doing that test just once at the top of the function is actually the correct thing to do, even if it might look a bit wrong. At most, maybe add a comment to that 'uses_kmap' initialization. Linus