[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241104162409.2750133-1-joshua.hahnjy@gmail.com>
Date: Mon, 4 Nov 2024 08:24:09 -0800
From: Joshua Hahn <joshua.hahnjy@...il.com>
To: usamaarif642@...il.com
Cc: 21cnbao@...il.com,
ak@...ux.intel.com,
akpm@...ux-foundation.org,
baolin.wang@...ux.alibaba.com,
chengming.zhou@...ux.dev,
chrisl@...nel.org,
david@...hat.com,
hannes@...xchg.org,
hughd@...gle.com,
kasong@...cent.com,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
nphamcs@...il.com,
ryan.roberts@....com,
shakeel.butt@...ux.dev,
v-songbaohua@...o.com,
willy@...radead.org,
ying.huang@...el.com,
yosryahmed@...gle.com
Subject: Re: [PATCH v2] mm: count zeromap read and set for swapout and swapin
On 02/11/2024 14:43:07, Usama Arif <usamaarif642@...il.com> wrote:
> On 02/11/2024 12:59, Barry Song wrote:
>> On Sat, Nov 2, 2024 at 8:32 PM Usama Arif <usamaarif642@...il.com> wrote:
>>>
>>> On 02/11/2024 10:12, Barry Song wrote:
>>>> From: Barry Song <v-songbaohua@...o.com>
>>>>
>>>> When the proportion of folios from the zero map is small, missing their
>>>> accounting may not significantly impact profiling. However, it’s easy
>>>> to construct a scenario where this becomes an issue—for example,
>>>> allocating 1 GB of memory, writing zeros from userspace, followed by
>>>> MADV_PAGEOUT, and then swapping it back in. In this case, the swap-out
>>>> and swap-in counts seem to vanish into a black hole, potentially
>>>> causing semantic ambiguity.
>>>>
>>>> This patch adopts option 1 as pswpin/pswpout counters are that they
>>>> only apply to IO done directly to the backend device (as noted by
>>>> Nhat Pham).
>>>>
>>>> Fixes: 0ca0c24e3211 ("mm: store zero pages to be swapped out in a bitmap")
>>> I don't think its a hotfix (or even a fix). It was discussed in the initial
>>> series to add these as a follow up and Joshua was going to do this soon.
>>> Its not fixing any bug in the initial series.
>>
>> I didn't realize Joshua was handling it. Is he still planning to? If
>> so, I can leave it
>> with Joshua if that was the plan :-)
>>
>
> Please do continue with this patch, I think he was going to look at the
> swapped_zero version that we discussed earlier anyways. Will let Joshua
> comment on it.
Hi Usama and Barry,
First of all, I am sorry for not participating in the previous conversation
about this, it is my fault for the lack of communication on my end on the
status of zero_swapped (name pending). Sorry for the confusion!
I am hoping to pick this up in a few days (I have been working on a few
patches in different subsystems, but I will wrap up the work on these
very soon).
As far as I can tell, zero_swapped and swp{in,out}zero seem to be
orthogonal, and as Nhat pointed out [1] I think there is need for both.
Thank you for this patch Barry, and thank you Usama for keeping me in
the loop! Have a great day!
Joshua
[1] https://lore.kernel.org/linux-mm/882008b6-13e0-41d8-91fa-f26c585120d8@gmail.com/T/#m7c5017bc97d56843242d3e006cd7e1f0fd0f1a38
Powered by blists - more mailing lists