Re: [PATCH v8 01/23] mm: Introduce PTE_MARKER swap entry

Peter Xu
2022-04-19T19:45:02Z

On Tue, Apr 19, 2022 at 06:25:31PM +1000, Alistair Popple wrote:
> Hi Peter,

Hi, Alistair,

>
> Is there something I have missed that means PTE markers can only be used with
> file-backed memory? Obviously that's all you care about for this patch series,
> but if we needed to mark some anonymous PTE for special processing is there
> anything that would prevent us using a PTE marker? Specifically I was thinking
> about it in relation to this series:
> <https://lore.kernel.org/linux-mm/87pmldjxiq.fsf@nvdebian.thelocal/>

It's not necessarily to be restricted to file-backed. All the file-backed
check here in this series was just for safety purpose and nothing else.

I think it's a very good example of that swap-read-error case that pte
marker does sound like a great fit, but let's see whether people would
still like to stick with hwpoison which makes some sense too. Then let's
keep the discussion in that thread.

Thanks for the pointer!

--
Peter Xu