[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cbd3b3d-48b7-42b0-88e1-a9316e4acc53@redhat.com>
Date: Mon, 20 Jan 2025 14:56:54 +0100
From: David Hildenbrand <david@...hat.com>
To: Lance Yang <ioworker0@...il.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: akpm@...ux-foundation.org, 21cnbao@...il.com, ryan.roberts@....com,
dev.jain@....com, shy828301@...il.com, ziy@...dia.com,
libang.li@...group.com, baolin.wang@...ux.alibaba.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, Liam.Howlett@...cle.com,
vbabka@...e.cz, jannh@...gle.com, Jason@...c4.com,
Mingzhe Yang <mingzhe.yang@...com>
Subject: Re: [RFC 1/1] mm/madvise: fail MADV_PAGEOUT on VM_DROPPABLE VMA
On 20.01.25 14:47, Lance Yang wrote:
> Hi Barry, David and Lorenzo,
>
> Thanks a lot for taking time to review!
>
> On Mon, Jan 20, 2025 at 6:45 PM Lorenzo Stoakes
> <lorenzo.stoakes@...cle.com> wrote:
>>
>> Sorry but NACK again on this :(
>>
>> On Mon, Jan 20, 2025 at 09:30:38AM +0800, Lance Yang wrote:
>>> MADV_PAGEOUT should fail on VMAs with the VM_DROPPABLE flag. While
>>> MADV_PAGEOUT is intended to move anonymous pages to swap, VM_DROPPABLE
>>> should not be swapped out.
>>>
>>> There is an issue where using MADV_PAGEOUT on a VMA with the VM_DROPPABLE
>>> flag behaves like MADV_DONTNEED, causing the pages to be dropped. This
>>> could break the semantics of MADV_PAGEOUT, IMO.
>>>
>>> So, let's add a check to detect the VM_DROPPABLE flag before doing
>>> MADV_PAGEOUT and returns -EINVAL.
>>
>> No, let's not.
>
> I think I completely got it wrong. Learning so much from your patient responses!
Maybe you can make the documentation (man pages?) clearer in that
regard? Thanks!
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists