From: David Hildenbrand <david@redhat.com>
To: Chengming Zhou <chengming.zhou@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
Stefan Roesch <shr@devkernel.io>, xu xin <xu.xin16@zte.com.cn>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
zhouchengming@bytedance.com
Subject: Re: [PATCH 1/4] mm/ksm: fix ksm_pages_scanned accounting
Date: Wed, 8 May 2024 14:32:51 +0200 [thread overview]
Message-ID: <71027eed-8ddb-4b67-b5d5-a55e52a7133d@redhat.com> (raw)
In-Reply-To: <36168dfd-bdfa-42cd-965a-f7a0e108108e@linux.dev>
On 08.05.24 12:35, Chengming Zhou wrote:
> On 2024/5/8 17:55, Chengming Zhou wrote:
>> During testing, I found ksm_pages_scanned is unchanged although the
>> scan_get_next_rmap_item() did return valid rmap_item that is not NULL.
>>
>> The reason is the scan_get_next_rmap_item() will return NULL after
>> a full scan, so ksm_do_scan() just return without accounting of the
>> ksm_pages_scanned.
>>
>> Fix it by just putting ksm_pages_scanned accounting in that loop,
>> and it will be accounted more timely if that loop would last for
>> a long time.
>>
>
> Fixes: b348b5fe2b5f ("mm/ksm: add pages scanned metric")
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2024-05-08 12:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 9:55 [PATCH 0/4] mm/ksm: fix some accounting problems Chengming Zhou
2024-05-08 9:55 ` [PATCH 1/4] mm/ksm: fix ksm_pages_scanned accounting Chengming Zhou
2024-05-08 10:35 ` Chengming Zhou
2024-05-08 12:32 ` David Hildenbrand [this message]
2024-05-08 9:55 ` [PATCH 2/4] mm/ksm: fix ksm_zero_pages accounting Chengming Zhou
2024-05-08 10:37 ` Chengming Zhou
2024-05-08 12:36 ` David Hildenbrand
2024-05-08 13:52 ` Chengming Zhou
2024-05-08 9:55 ` [PATCH 3/4] mm/ksm: union hlist_node with list_head in struct ksm_stable_node Chengming Zhou
2024-05-08 9:55 ` [PATCH 4/4] mm/ksm: calculate general_profit more accurately Chengming Zhou
2024-05-08 10:24 ` [PATCH 0/4] mm/ksm: fix some accounting problems David Hildenbrand
2024-05-08 10:28 ` Chengming Zhou
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=71027eed-8ddb-4b67-b5d5-a55e52a7133d@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shr@devkernel.io \
--cc=xu.xin16@zte.com.cn \
--cc=zhouchengming@bytedance.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
all inboxes | Powered by JetHome®