Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1545179pxp; Thu, 17 Mar 2022 11:12:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNGgbQ+KfuJKhIcEYak7y5+H9gfmeBJpeQHo6c8RecjuRMPP7gF9kFt/VVZ0CNtm2KOKry X-Received: by 2002:a17:90b:3e8e:b0:1bf:489a:930d with SMTP id rj14-20020a17090b3e8e00b001bf489a930dmr6896956pjb.214.1647540753169; Thu, 17 Mar 2022 11:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647540753; cv=none; d=google.com; s=arc-20160816; b=l/uTNz08yAUSrnqHzp2PjsxP/c6JXY11fjSPrLaC0JFI4giC8vqiloZBAeLhK+/pPy AizH/cnSIx6t3lqNT4Cre2ZNSztXebEEa4SPXkAT7nqYcjX2fXnTU9OL7liJcF2x6ll+ cld6pz9xPkAvbJD8Rj4y7qHD2g3ihmnhvOZd1xFBhJfHn6HHa4S1vpZclnVIRWR+XgYe A0AQ4vGtGKm2C5ZxP2h6bljJlJIsqrMtjRbXWNR7xURiU9br5F++RYwLES9/jan9vvmZ QjMiEO4+aFgP77zBBjEx28YZdxf0E8LEf0sT6qKcaFyOv+mM3bBNB0qoojMRm1syUelX hmfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8T8SR1gcItuYuzS21S2TD+UdEPItV37/QojpZ+LuTHA=; b=LwqEutaZpanyMQAsDHfV8NZCoZ3hfCDkJnjqplpAWwtAWe1ts6Y50JPZtglGdAYkux QsQepJl1991MmN04ujzP7t6370xIpFBSuip0LzIpvdXn1Y5g6UDEJx09h+HhfeVEjCd/ WVFx3EXF7zWYbVfSQXPF2IG5BjWIcrsYmLCFJoK7A2bIrFULqQktfxy3VC6V2fQ4ZG1f hMIE+S1OdWg38cJKqdQO4jkbkdhb2pGm7XjQMmxVq342ayY9L0EFu8qNwe99ZyvelHld 13i0GbTV0FDAIzi3Z5zRD5Jog48svWLJdBOOaNm4jIZHX2qCmrcyd6Bu7yp3OfoDC/6C G6Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DliC2F5n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w13-20020a170902e88d00b00151a7b279a2si5689532plg.594.2022.03.17.11.12.15; Thu, 17 Mar 2022 11:12:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DliC2F5n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235622AbiCQPJ2 (ORCPT + 99 others); Thu, 17 Mar 2022 11:09:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234431AbiCQPJY (ORCPT ); Thu, 17 Mar 2022 11:09:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4FBC11C7E2 for ; Thu, 17 Mar 2022 08:08:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4D4D16191A for ; Thu, 17 Mar 2022 15:08:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50B73C340E9; Thu, 17 Mar 2022 15:08:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647529686; bh=VpVhfayEC+TH6g09gw9BzIHjHCB4WvV/mZKgOYWw+kQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DliC2F5naQZQpq6eBYkt/sMD9Ufo18N2xX6nqXHcpzKy3wfHS6BzpJgECkGRCw2Be +i+rGr4uCJEUr0chvy3yMLmo6k/CIZeT4492ckUe0veZ3HGUshZQeVQ6konkcdNnsB E2VOa3kLC8wfwUOC76nomXY3Wg1qDW27QggTWc+JTh5g51IxxbLzTw6hQuaU9+2hi0 F5S34Wh2Nsj/H2GqxQBULBVxXmk3yLKOdvK6FncocLeVcweMisV4P/18UtZi2VcNoh vs/xeimX6wlGfwTx7XMT9Yt+LQi1p7vrQyZEGdzF49eZleMxh31BgmaaxRAZYopdxh a4n8UwOOPvryw== Date: Thu, 17 Mar 2022 16:08:04 +0100 From: Frederic Weisbecker To: Marcelo Tosatti , Peter Zijlstra , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Nitesh Lal , Nicolas Saenz Julienne , Christoph Lameter , Juri Lelli , Alex Belits , Peter Xu , Daniel Bristot de Oliveira , Oscar Shiang Subject: Re: [patch v12 00/13] extensible prctl task isolation interface and vmstat sync Message-ID: <20220317150804.GB459366@lothringen> References: <20220315153132.717153751@fedora.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220315153132.717153751@fedora.localdomain> X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 15, 2022 at 12:31:32PM -0300, Marcelo Tosatti wrote: > The logic to disable vmstat worker thread, when entering > nohz full, does not cover all scenarios. For example, it is possible > for the following to happen: > > 1) enter nohz_full, which calls refresh_cpu_vm_stats, syncing the stats. > 2) app runs mlock, which increases counters for mlock'ed pages. > 3) start -RT loop > > Since refresh_cpu_vm_stats from nohz_full logic can happen _before_ > the mlock, vmstat shepherd can restart vmstat worker thread on > the CPU in question. > > To fix this, add task isolation prctl interface to quiesce > deferred actions when returning to userspace. > > The patchset is based on ideas and code from the > task isolation patchset from Alex Belits: > https://lwn.net/Articles/816298/ > > Please refer to Documentation/userspace-api/task_isolation.rst > (patch 1) for details. Its attached at the end of this message > in .txt format as well. > > Note: the prctl interface is independent of nohz_full=. > > The userspace patches can be found at https://people.redhat.com/~mtosatti/task-isol-v6-userspace-patches/ > > - qemu-task-isolation.patch: activate task isolation from CPU execution loop > - rt-tests-task-isolation.patch: add task isolation activation to cyclictest/oslat > - util-linux-chisol.patch: add chisol tool to util-linux. I still see a few details to sort out but overall the whole thing looks good: Acked-by: Frederic Weisbecker Perhaps it's time to apply this patchset on some branch and iterate from there. Thomas, Peter, what do you think? Thanks!