lkml.org 
[lkml]   [2023]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v13 2/6] mm/vmstat: Use vmstat_dirty to track CPU-specific vmstat discrepancies
On Thu, 5 Jan 2023, Marcelo Tosatti wrote:

> --- linux-2.6.orig/mm/vmstat.c
> +++ linux-2.6/mm/vmstat.c
> @@ -381,6 +381,7 @@ void __mod_zone_page_state(struct zone *
> x = 0;
> }
> __this_cpu_write(*p, x);
> + vmstat_mark_dirty();

__vmstat_mark_dirty()? See earlier patch

>
> preempt_enable_nested();
> }
> @@ -417,6 +418,7 @@ void __mod_node_page_state(struct pglist
> x = 0;
> }
> __this_cpu_write(*p, x);
> + vmstat_mark_dirty();

Ditto.

>
> preempt_enable_nested();
> }
> @@ -577,6 +579,9 @@ static inline void mod_zone_state(struct
> s8 __percpu *p = pcp->vm_stat_diff + item;
> long o, n, t, z;
>
> + /* cmpxchg and vmstat_mark_dirty should happen on the same CPU */
> + preempt_disable();

If you are disabling preemption then why do we still need cmpxchg?
Same again below.

\
 
 \ /
  Last update: 2023-03-26 23:34    [W:0.105 / U:1.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site