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] [day] [month] [year] [list]
Message-ID: <YC2IW+Isx1wplT6/@google.com>
Date:   Wed, 17 Feb 2021 13:19:23 -0800
From:   Minchan Kim <minchan@...nel.org>
To:     John Hubbard <jhubbard@...dia.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-mm <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>, surenb@...gle.com,
        joaodias@...gle.com
Subject: Re: [PATCH] mm: vmstat: add cma statistics

On Wed, Feb 17, 2021 at 12:57:25PM -0800, John Hubbard wrote:
> On 2/17/21 9:00 AM, Minchan Kim wrote:
> > Since CMA is used more widely, it's worth to have CMA
> > allocation statistics into vmstat. With it, we could
> > know how agressively system uses cma allocation and
> > how often it fails.
> > 
> > Signed-off-by: Minchan Kim <minchan@...nel.org>
> > ---
> >   include/linux/vm_event_item.h |  3 +++
> >   mm/cma.c                      | 12 +++++++++---
> >   mm/vmstat.c                   |  4 ++++
> >   3 files changed, 16 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h
> > index 18e75974d4e3..0c567014ce82 100644
> > --- a/include/linux/vm_event_item.h
> > +++ b/include/linux/vm_event_item.h
> > @@ -70,6 +70,9 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
> >   #endif
> >   #ifdef CONFIG_HUGETLB_PAGE
> >   		HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL,
> > +#endif
> > +#ifdef CONFIG_CMA
> > +		CMA_ALLOC, CMA_ALLOC_FAIL,
> 
> This seems wrong: here it's called "alloc", but in the output it's
> called "alloc success", and in the implementation it's clearly
> "alloc attempt" that is being counted.

Argh, I wanted to introduce CMA_ALLOC, not ALLOC_ATTEMPTS.
Let me fix.

> 
> Once these are all made consistent, then the bug should naturally
> go away as part of that.
> 
> nit: I think the multiple items per line is a weak idea at best, even
> though it's used here already. Each item is important and needs to be
> visually compared to it's output item later. So one per line might
> have helped avoid mismatches, and I think we should change to that to
> encourage that trend.

No problem.
Thanks for the review, John.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ