[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d0b8384b-6699-0485-1d39-afbf598a34e9@redhat.com>
Date: Tue, 25 Oct 2022 17:31:43 +0200
From: David Hildenbrand <david@...hat.com>
To: Peter Xu <peterx@...hat.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Cc: Huang Ying <ying.huang@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
HORIGUCHI NAOYA <naoya.horiguchi@....com>,
Miaohe Lin <linmiaohe@...wei.com>,
Andrea Arcangeli <aarcange@...hat.com>
Subject: Re: [PATCH RFC 2/2] mm: Use pte markers for swap errors
On 24.10.22 22:48, Peter Xu wrote:
> PTE markers are ideal mechanism for things like SWP_SWAPIN_ERROR. Using a
> whole swap entry type for this purpose can be an overkill, especially if we
> already have PTE markers. Define a new bit for swapin error and replace it
> with pte markers. Then we can safely drop SWP_SWAPIN_ERROR and give one
> device slot back to swap.
>
> We used to have SWP_SWAPIN_ERROR taking the page pfn as part of the swap
> entry, but it's never used. Neither do I see how it can be useful because
> normally the swapin failure should not be caused by a bad page but bad swap
> device. Drop it alongside.
[...]
>
> -#define PTE_MARKER_UFFD_WP BIT(0)
> -#define PTE_MARKER_MASK (PTE_MARKER_UFFD_WP)
> +#define PTE_MARKER_UFFD_WP BIT(0)
> +#define PTE_MARKER_SWAP_ERROR BIT(1)
I'd suggest to keep the term SWAPIN. An error happened during swapin,
which is why the page is corrupted.
(I remember that we discussed naming details in the original series and
SWAPIN was the conclusion)
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists