lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231115031553.1970634-1-xu.xin16@zte.com.cn>
Date:   Wed, 15 Nov 2023 03:15:53 +0000
From:   xu <xu.xin.sc@...il.com>
To:     david@...hat.com
Cc:     akpm@...ux-foundation.org, imbrenda@...ux.ibm.com,
        jiang.xuexin@....com.cn, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, ran.xiaokai@....com.cn, wang.yong12@....com.cn,
        xu.xin.sc@...il.com, xu.xin16@....com.cn, yang.yang29@....com.cn
Subject: Re: [PATCH] ksm: delay the check of splitting compound pages

>> From: xu xin <xu.xin16@....com.cn>
>> 
>> Background
>> ==========
>> When trying to merge two pages, it may fail because the two pages
>> belongs to the same compound page and split_huge_page fails due to
>> the incorrect reference to the page. To solve the problem, the commit
>> 77da2ba0648a4 ("mm/ksm: fix interaction with THP") tries to split the
>> compound page after try_to_merge_two_pages() fails and put_page in
>> that case. However it is too early to calculate of the variable 'split' which
>> indicates whether the two pages belongs to the same compound page.
>> 
>> What to do
>> ==========
>> If try_to_merge_two_pages() succeeds, there is no need to check whether
>> to splitting compound pages. So we delay the check of splitting compound
>> pages until try_to_merge_two_pages() fails, which can improve the
>> processing efficiency of cmp_and_merge_page() a little.
>> 
>> Signed-off-by: xu xin <xu.xin16@....com.cn>
>> Reviewed-by: Yang Yang <yang.yang29@....com.cn>
>
>Can we please add a unit test to ksm_functional_tests.c so we actually 
>get it right this time?

Sure. Maybe we can simply refer to the reproducing way Claudio proposes in
77da2ba0648a4 ("mm/ksm: fix interaction with THP").

>-- 
>Cheers,
>
>David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ