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: <624d434a.1c69fb81.11e99.b2b8@mx.google.com>
Date:   Wed, 6 Apr 2022 07:37:43 +0000
From:   CGEL <cgel.zte@...il.com>
To:     David Hildenbrand <david@...hat.com>
Cc:     akpm@...ux-foundation.org, bsingharora@...il.com,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Yang Yang <yang.yang29@....com.cn>,
        Ran Xiaokai <ran.xiaokai@....com.cn>
Subject: Re: [PATCH] delayacct: track delays from COW

On Wed, Mar 23, 2022 at 09:49:46AM +0100, David Hildenbrand wrote:
> On 22.03.22 12:04, cgel.zte@...il.com wrote:
> > From: Yang Yang <yang.yang29@....com.cn>
> > 
> > Delay accounting does not track the delay of COW. When tasks trigger
> > much COW, it may spend a amount of time waiting for it. To get the
> > impact of tasks in COW, measure the delay when it happens. This
> > could help users to do tunnings, such as decide whether to use
> > ksm or not.
> > 
> > Also update tools/accounting/getdelays.c:
> > 
> >     / # ./getdelays -dl -p 231
> >     print delayacct stats ON
> >     listen forever
> >     PID     231
> > 
> >     CPU             count     real total  virtual total    delay total  delay average
> >                      6247     1859000000     2154070021     1674255063          0.268ms
> >     IO              count    delay total  delay average
> >                         0              0              0ms
> >     SWAP            count    delay total  delay average
> >                         0              0              0ms
> >     RECLAIM         count    delay total  delay average
> >                         0              0              0ms
> >     THRASHING       count    delay total  delay average
> >                         0              0              0ms
> >     COMPACT         count    delay total  delay average
> >                         3          72758              0ms
> >     COW             count    delay total  delay average
> >                      3635      271567604              0ms
> 
> You should also update Documentation/accounting/delay-accounting.rst
> most probably.
> 
> Overall LGTM and this might be of value not only for KSM but for anybody
> using fork(). There will be collisions with [1], especially [2], which I
> want to get in -next early after we have v5.18-rc1 (after rebasing [1]
> on top of this).
> 
> We'll have to decide if we want to also account hugetlb wp code
> (hugetlb_cow), and if we want to account "unsharing" here as well under
> cow (I tend to say that we want to for simplicity). For THP, we only
> split and don't copy, so there isn't anything to account.
>
As for simplicity, what about account "PAGECOPY" instead of "COW"?
"PAGECOPY" include COW and unsharing. And we may also account hugetlb
wp in follow-up patches, based on this patch is sufficient reviewed.

> [1] https://lore.kernel.org/r/20220315104741.63071-1-david@redhat.com
> [2] https://lore.kernel.org/r/20220315104741.63071-14-david@redhat.com
> 
> -- 
> Thanks,
> 
> David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ