lkml.org 
[lkml]   [2022]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-08-26 15:33    [W:0.079 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site