Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp457579pxb; Mon, 25 Apr 2022 13:47:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE07D75DoziRMX0D8vch4P1sjCpRUli9FX8wYR66sl3IgcAnuVDvDl9rwUYElAfl1XEdLr X-Received: by 2002:a63:1117:0:b0:399:2df0:7fb9 with SMTP id g23-20020a631117000000b003992df07fb9mr16988417pgl.40.1650919653128; Mon, 25 Apr 2022 13:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650919653; cv=none; d=google.com; s=arc-20160816; b=ehAspxceLXO68UwV53McuV9lAwp9Si9ym0WHBf0sMQgXdNdgnS4+FeHcoe7VVPSDNZ p8Sg0ne72inzdafqPI8B/WKxX45RBTCKfyZ4wvl/oTxiiUjx/hM//Yjx3yZyQ1B6pego teucV38SFfnNVy+ijii2slZKHEChK/H43TX/geQzmktpRQx0UOwRIP6NSyZRBPtYSrbc grIYI3ZH319wyKB+JBWyXG7uc3mL1F4ZrpNDGwMG6KuBJYXIb1ngBB1LIGGo3tzooBev pk7+YahfMGKzAxwFFyTUMG5IG46dz5Tk+QKOZqSDaII51Obbl6rWZYwaQICzdUatqcHq Qraw== 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=K7g3AatLSzn8/HLimbJLWaWvwBPHnQqNizbHt7sJOJ8=; b=zcT0Na39SqT6pNW4Zy46riv8hp4zsRyU/mqRdKzk3rtsSOEiFIfN3VVTO24N7ZlrAv P+iVW4K88N4S/08oZ4mcLz2D2fpMvju/wyc5lIjtMAUemDlqyp+eNBP0ARJ8ExbfmOtr r9UXXundteyddP45ds7l3MHmfWjyJfQQ8dnekxpMBOGOIQHawPXLSN6X0InYZwsrjtZk DtaQ3zaUS/Tb5GZkpb+vENqCOisAu4ya+haqmjNmGP86H0Bjs15UxcA0ssQ9bpUOMHsG t3EZKKx53YwjrtsWW2iI+X0FrWIMT2QEigqrytKH5thmXF/8EkkmiwuHHVqCjYVXu389 xqvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CythLHqh; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bj12-20020a170902850c00b0015cf92b7fbbsi6047601plb.503.2022.04.25.13.47.08; Mon, 25 Apr 2022 13:47: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=@redhat.com header.s=mimecast20190719 header.b=CythLHqh; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242275AbiDYQcq (ORCPT + 99 others); Mon, 25 Apr 2022 12:32:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243466AbiDYQci (ORCPT ); Mon, 25 Apr 2022 12:32:38 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D1E1DB1A9C for ; Mon, 25 Apr 2022 09:29:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650904165; 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=K7g3AatLSzn8/HLimbJLWaWvwBPHnQqNizbHt7sJOJ8=; b=CythLHqhzFkZvdocx29D+dh4T3KhFkeRuP8jbIzwS9JCVZVjc4leqaLUn+QUi36Y6PDAoL ybNC0rkMxt7zXWCbK2sPwFlLbuzJn5+itfh31zggwfEhhV8dcKm6xQh/33IgvsUIP9lolA 7X9m7dLR7xYMttUldVh0IILtwVSH21s= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-297-AVsaUf9RP2yJGQNI6O5rkw-1; Mon, 25 Apr 2022 12:29:24 -0400 X-MC-Unique: AVsaUf9RP2yJGQNI6O5rkw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 099CD1C0513A; Mon, 25 Apr 2022 16:29:24 +0000 (UTC) Received: from fuller.cnet (ovpn-112-4.gru2.redhat.com [10.97.112.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 293C640CF91E; Mon, 25 Apr 2022 16:29:22 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id 592EF416F574; Mon, 25 Apr 2022 13:29:04 -0300 (-03) Date: Mon, 25 Apr 2022 13:29:04 -0300 From: Marcelo Tosatti To: Frederic Weisbecker Cc: Peter Zijlstra , Thomas Gleixner , 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: References: <20220315153132.717153751@fedora.localdomain> <20220317150804.GB459366@lothringen> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220317150804.GB459366@lothringen> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE 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 Thu, Mar 17, 2022 at 04:08:04PM +0100, Frederic Weisbecker wrote: > 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! Ping ?