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]
Date:   Mon, 6 Apr 2020 14:50:32 -0400
From:   Zi Yan <ziy@...dia.com>
To:     "Kirill A. Shutemov" <kirill@...temov.name>
CC:     <akpm@...ux-foundation.org>,
        Andrea Arcangeli <aarcange@...hat.com>,
        "Yang Shi" <yang.shi@...ux.alibaba.com>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCHv2 1/8] khugepaged: Add self test

On 6 Apr 2020, at 11:20, Kirill A. Shutemov wrote:

> External email: Use caution opening links or attachments
>
>
> On Mon, Apr 06, 2020 at 10:59:52AM -0400, Zi Yan wrote:
>> I ran this test with all patches from this series applied to Linus’s
>> tree, but still see several failures. Is it expected?
>
> [Thanks for catching all my typos]
>
> No. It works fine for me.
> Well, occasionally, it fails to swap out a page, but nothing like you have
> here.
>
> Could you try to trace it? I used script like below after mounting
> tracefs. You may want to comment out all tests but a failing one.


Sure.

>
> #!/bin/sh -efu
>
> echo > /sys/kernel/tracing/trace
> echo 1 > /sys/kernel/tracing/events/huge_memory/enable
>
> while ./khugepaged; do
>         echo > /sys/kernel/tracing/trace
> done
>
> cat /sys/kernel/tracing/trace

The test output is (should be useful to tell you the failed tests):

root@...sysarch-yz:/home/yanzi# ./trace.sh
Save THP and khugepaged settings... OK
Adjust settings... OK
Collapse fully populated PTE table.... Fail
Collapse PTE table with single PTE entry present.... Fail
Collapse with max_ptes_none PTEs empty.... Fail
Swapout one page... OK
Collapse with swaping in single PTE entry.... Fail
Swapout 64 of 512 pages... OK
Collapse with max_ptes_swap pages swapped out.... Fail
Allocate huge page... OK
Split huge page leaving single PTE mapping compount page... OK
Collapse PTE table with single PTE mapping compount page.... Fail
Allocate huge page... OK
Split huge page leaving single PTE page table full of compount pages... OK
Collapse PTE table full of compound pages.... Fail
Construct PTE page table full of different PTE-mapped compound pages 512/512... OK
Collapse PTE table full of different compound pages.... Fail
Allocate small page... OK
Share small page over fork()... OK
Collapse PTE table with single page shared with parent process.... Fail
Check if parent still has small page... OK
Allocate huge page... OK
Share huge page over fork()... OK
Split huge page PMD in child process... OK
Collapse PTE table full of compound pages in child.... Fail
Check if parent still has huge page... OK
Allocate huge page... OK
Share huge page over fork()... OK
Trigger CoW in 255 of 512... OK
Do not collapse with max_ptes_shared exeeded.... OK
Trigger CoW in 256 of 512... OK
Collapse with max_ptes_shared PTEs shared.... Fail
Check if parent still has huge page... OK
Restore THP and khugepaged settings... OK


The trace is attached.


—
Best Regards,
Yan Zi

View attachment "khugepaged.trace" of type "text/plain" (182573 bytes)

Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ