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:   Fri, 26 Aug 2022 14:29:14 +0100
From:   Aaron Tomlin <atomlin@...hat.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Marcelo Tosatti <mtosatti@...hat.com>, frederic@...nel.org,
        cl@...ux.com, tglx@...utronix.de, mingo@...nel.org,
        peterz@...radead.org, pauld@...hat.com, neelx@...hat.com,
        oleksandr@...alenko.name, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org
Subject: Re: [PATCH v7 1/3] mm/vmstat: Use per cpu variable to track a vmstat
 discrepancy

On Wed 2022-08-24 13:20 -0700, Andrew Morton wrote:
> > --- linux-2.6.orig/mm/vmstat.c
> > +++ linux-2.6/mm/vmstat.c
> > @@ -195,6 +195,12 @@ void fold_vm_numa_events(void)
> >  #endif
> >  
> >  #ifdef CONFIG_SMP
> > +static DEFINE_PER_CPU_ALIGNED(bool, vmstat_dirty);
> > +
> > +static inline void mark_vmstat_dirty(void)
> > +{
> > +	this_cpu_write(vmstat_dirty, true);
> > +}
> 
> If we're to have a helper for this then how about helpers for clearing
> it and reading it?
> 
> Also, vmstat_mark_dirty(), vmstat_clear_dirty() and vmstat_dirty()
> would be better identifiers.
> 
> Then those helper functions become good sites for comments explaining
> what's going on.
> 

Hi Andrew,

Fair enough. I'll work on that.


Kind regards,

-- 
Aaron Tomlin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ