From: Joshua Hahn <joshua.hahnjy@gmail.com>
To: usamaarif642@gmail.com
Cc: 21cnbao@gmail.com, ak@linux.intel.com, akpm@linux-foundation.org,
baolin.wang@linux.alibaba.com, chengming.zhou@linux.dev,
chrisl@kernel.org, david@redhat.com, hannes@cmpxchg.org,
hughd@google.com, kasong@tencent.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
nphamcs@gmail.com, ryan.roberts@arm.com, shakeel.butt@linux.dev,
v-songbaohua@oppo.com, willy@infradead.org, ying.huang@intel.com,
yosryahmed@google.com
Subject: Re: [PATCH v2] mm: count zeromap read and set for swapout and swapin
Date: Mon, 4 Nov 2024 08:24:09 -0800 [thread overview]
Message-ID: <20241104162409.2750133-1-joshua.hahnjy@gmail.com> (raw)
In-Reply-To: <2d73b4cc-47a1-44a2-b50a-0f67d25b3e22@gmail.com>
On 02/11/2024 14:43:07, Usama Arif <usamaarif642@gmail.com> wrote:
> On 02/11/2024 12:59, Barry Song wrote:
>> On Sat, Nov 2, 2024 at 8:32 PM Usama Arif <usamaarif642@gmail.com> wrote:
>>>
>>> On 02/11/2024 10:12, Barry Song wrote:
>>>> From: Barry Song <v-songbaohua@oppo.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
next prev parent reply other threads:[~2024-11-04 16:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-02 10:12 Barry Song
2024-11-02 12:32 ` Usama Arif
2024-11-02 12:59 ` Barry Song
2024-11-02 14:43 ` Usama Arif
2024-11-04 16:24 ` Joshua Hahn [this message]
2024-11-04 12:32 ` David Hildenbrand
2024-11-05 3:40 ` Andrew Morton
2024-11-05 8:23 ` David Hildenbrand
2024-11-05 8:24 ` David Hildenbrand
2024-11-05 9:15 ` Barry Song
2024-11-05 10:44 ` Usama Arif
2024-11-05 10:57 ` Barry Song
2024-11-05 11:09 ` David Hildenbrand
2024-11-04 12:42 ` David Hildenbrand
2024-11-04 16:34 ` Johannes Weiner
2024-11-04 17:10 ` David Hildenbrand
2024-11-04 18:48 ` Usama Arif
2024-11-04 20:56 ` David Hildenbrand
2024-11-04 21:24 ` Usama Arif
2024-11-05 1:28 ` Barry Song
2024-11-05 19:35 ` Nhat Pham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241104162409.2750133-1-joshua.hahnjy@gmail.com \
--to=joshua.hahnjy@gmail.com \
--cc=21cnbao@gmail.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=chengming.zhou@linux.dev \
--cc=chrisl@kernel.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=ryan.roberts@arm.com \
--cc=shakeel.butt@linux.dev \
--cc=usamaarif642@gmail.com \
--cc=v-songbaohua@oppo.com \
--cc=willy@infradead.org \
--cc=ying.huang@intel.com \
--cc=yosryahmed@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox