Re: [patch v12 07/13] task isolation: sync vmstats conditional on changes
From: Thomas Gleixner
Date: Wed Apr 27 2022 - 04:04:05 EST
On Tue, Mar 15 2022 at 12:31, Marcelo Tosatti wrote:
>
> +#ifdef CONFIG_TASK_ISOLATION
> +struct static_key vmstat_sync_enabled;
jump_label.h:
"The use of 'struct static_key' directly, is now DEPRECATED."
> +DEFINE_PER_CPU_ALIGNED(bool, vmstat_dirty);
> +
> +static inline void mark_vmstat_dirty(void)
> +{
> + if (!static_key_false(&vmstat_sync_enabled))
> + return;
> +
> + raw_cpu_write(vmstat_dirty, true);
What's the justification for raw_cpu_write()?
>
> @@ -1512,6 +1543,7 @@ static void pagetypeinfo_showfree_print(
> }
> seq_putc(m, '\n');
> }
> + mark_vmstat_dirty();
Why does a function which just dumps information via /proc/pagetypeinfo
make vmstats dirty?
Thanks,
tglx