lkml.org 
[lkml]   [2021]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 3/5] mm: vmstat: optionally flush per-CPU vmstat counters on return to userspace
On Mon, Jul 12, 2021 at 11:05:58AM +0200, Christoph Lameter wrote:
> On Fri, 9 Jul 2021, Marcelo Tosatti wrote:
>
> > +
> > + if (!static_branch_unlikely(&vmstat_sync_enabled))
> > + return;
> > +
> > + cpu = smp_processor_id();
> > +
> > + if (housekeeping_cpu(cpu, HK_FLAG_QUIESCE_URET))
> > + return;
> > +
> > + per_cpu(vmstat_dirty, smp_processor_id()) = true;
> > +}
>
> And you are going to insert this into all the performance critical VM
> statistics handling. Inline?

Yes, this is what the patch below is supposed to do (maybe it missed
some statistics?).

The alternative would be some equivalent of need_update on return to
userspace (for all system call returns) (when the HK_FLAG_QUIESCE_URET
flag is enabled).

> And why do you need to do such things as to determine the processor? At
> mininum do this using this cpu operations like the vmstat functions
> currently do.

OK, will do that and resend.

> And, lucky us, now we also have
> more issues why we should disable preemption etc etc while handling vm
> counters.

\
 
 \ /
  Last update: 2021-07-13 03:17    [W:0.052 / U:2.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site