From: David Hildenbrand <david@redhat.com>
To: yang.yang29@zte.com.cn
Cc: akpm@linux-foundation.org, imbrenda@linux.ibm.com,
jiang.xuexin@zte.com.cn, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, ran.xiaokai@zte.com.cn, xu.xin.sc@gmail.com,
xu.xin16@zte.com.cn
Subject: Re: [PATCH v5 2/6] ksm: support unsharing zero pages placed by KSM
Date: Mon, 13 Feb 2023 13:44:07 +0100 [thread overview]
Message-ID: <ca0ada59-e1a4-dd74-1a52-233c77b3ad4e@redhat.com> (raw)
In-Reply-To: <202302041418359766772@zte.com.cn>
On 04.02.23 07:18, yang.yang29@zte.com.cn wrote:
[sorry, was on vacation last week]
>> Why use flags if they both conditions are mutually exclusive?
>
> Just to make the return value of break_ksm_pmd_entry() more expressive and
> understandable. because break_ksm_pmd_entry have three types of returned
> values (0, 1, 2).
It adds confusion. Just simplify it please.
>
>> MADV_UNMERGEABLE -> unmerge_ksm_pages() will never unshare the shared
>> zeropage? I thought the patch description mentions that that is one of
>> the goals?
>
> No, MADV_UNMERGEABLE will trigger KSM to unshare the shared zeropages in the
> context of "get_next_rmap_item() -> unshare_zero_pages(), but not directly in the
> context of " madvise()-> unmerge_ksm_pages() ". The reason for this is to avoid
> increasing long delays of madvise() calling on unsharing zero pages.
>
Why do we care and make this case special?
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2023-02-13 12:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-30 1:13 yang.yang29
2023-01-18 14:10 ` David Hildenbrand
2023-02-04 6:18 ` yang.yang29
2023-02-13 12:44 ` David Hildenbrand [this message]
2023-03-11 5:37 xu xin
2023-03-13 12:14 ` David Hildenbrand
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=ca0ada59-e1a4-dd74-1a52-233c77b3ad4e@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=imbrenda@linux.ibm.com \
--cc=jiang.xuexin@zte.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ran.xiaokai@zte.com.cn \
--cc=xu.xin.sc@gmail.com \
--cc=xu.xin16@zte.com.cn \
--cc=yang.yang29@zte.com.cn \
/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