Re: + zswap-make-zswap_load-take-a-folio-fix.patch added to mm-unstable branch

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

 




On 8/12/2023 1:18 AM, Andrew Morton wrote:
> On Fri, 11 Aug 2023 13:20:44 +0800 "Yin, Fengwei" <fengwei.yin@xxxxxxxxx> wrote:
> 
>>
>>
>> On 8/11/2023 12:11 PM, Matthew Wilcox wrote:
>>> On Thu, Aug 10, 2023 at 09:35:37AM -0700, Andrew Morton wrote:
>>>>
>>>> The patch titled
>>>>      Subject: zswap: don't warn if none swapcache folio is passed to zswap_load
>>>> has been added to the -mm mm-unstable branch.  Its filename is
>>>>      zswap-make-zswap_load-take-a-folio-fix.patch
>>>
>>> Disagree that this is a fix patch.  My original patch does:
>> Agree with Matthew. The warning was not introduced by Matthew's patch.
>>
>>>
>>> -       VM_WARN_ON_ONCE(!PageLocked(page));
>>> -       VM_WARN_ON_ONCE(!PageSwapCache(page));
>>> +       VM_WARN_ON_ONCE(!folio_test_locked(folio));
>>> +       VM_WARN_ON_ONCE(!folio_test_swapcache(folio));
>>>
>>> so I didn't add a new assertion, merely removed a call to
>>> compound_head().  I think this patch deserves to stand on its own and
>>> not be folded into mine.
>>>
> 
> OK, so it seems these assertions were added by hannes's "mm: kill
> frontswap"
> (https://lkml.kernel.org/r/20230717160227.GA867137@xxxxxxxxxxx).  I'm
> not really sure why - they don't appear to have been moved from
> elsewhere.
> 
> So I'll requeue this as a fix against mm-kill-frontswap.patch.
> 
> The same two assertions were added to zswap_store().  Are they correct?
My understanding is they are correct as folio needs be added to swap
successfully before hit zswap_store(). Add Yosry for confirmation. Thanks.


Regards
Yin, Fengwei

>



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux