From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40EA7C433F5 for ; Wed, 27 Apr 2022 08:04:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359239AbiD0IHM (ORCPT ); Wed, 27 Apr 2022 04:07:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243567AbiD0IHL (ORCPT ); Wed, 27 Apr 2022 04:07:11 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A70151585 for ; Wed, 27 Apr 2022 01:04:00 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651046639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NVrj/IozLz+YLWMa6Aoyk1/gX+kCZfAflMvOSoBkH+U=; b=hRfN7NDAQ6mU9wp5eFxj+DYfCHPs9azOITyD2BKrRWG0JFePx7KCJTmu+rNLr5KB3sXW5m vD/VA9RgieHmpARGPQt4YAUGCf0frQwHN3SPu+ooQNKpBLtV0wEgIGpF5mEEq0Jpw+mBOG +bCQM8MpHbOGL61wq2Iru3KuEqA5ZaRI1f+1RhkI6xuO2jDNkldnVpBIu/ertS1HOUp+xB vH1KfL8RhmkqWeLBMeKAUFX5CT72lcolpIDSGbWepumi2Onr8hsbJK3SLPmTp1jtxV+Xyk i+Q2GSF6aEMASPkWEzy2NYL5DM8vwRCievUk/6Xh4aoaqAUl7eqh+2b/sERsIQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651046639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NVrj/IozLz+YLWMa6Aoyk1/gX+kCZfAflMvOSoBkH+U=; b=IPl5zJQ4XmUiSpIBPJlMNPVh+Fw5TE3wmL6lz2+trLDTLAUelYj15SAtSOpdktYrXScZCb eP50UJN3nNpdjkAw== To: Marcelo Tosatti , linux-kernel@vger.kernel.org Cc: Nitesh Lal , Nicolas Saenz Julienne , Frederic Weisbecker , Christoph Lameter , Juri Lelli , Peter Zijlstra , Alex Belits , Peter Xu , Daniel Bristot de Oliveira , Oscar Shiang , Marcelo Tosatti Subject: Re: [patch v12 07/13] task isolation: sync vmstats conditional on changes In-Reply-To: <20220315153314.042469218@fedora.localdomain> References: <20220315153132.717153751@fedora.localdomain> <20220315153314.042469218@fedora.localdomain> Date: Wed, 27 Apr 2022 10:03:58 +0200 Message-ID: <87tuafx89d.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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