Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2211507pxm; Fri, 4 Mar 2022 11:28:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxM5AH3OaqRTV+3zMXTaywOvcv5emvU50ra5E0ji3GSmmBtgcgD8VKo0/QZMNTOmXv2Uzz/ X-Received: by 2002:a17:902:b488:b0:14e:e9f3:24a2 with SMTP id y8-20020a170902b48800b0014ee9f324a2mr7610plr.72.1646422120004; Fri, 04 Mar 2022 11:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646422119; cv=none; d=google.com; s=arc-20160816; b=g7IXBnKPaayHmsoWHgdykGt9fpD12zai02hRh/2BV5E/TFG2Ahl4W0GVcv1DrwTZtg w0X7SatqGMb8DQJgKK+DRtFK0aCdPi5sOuX17GAOB/m7Iuu4xZWWieT9euejQwy8FilB txUhnSehaEdW63L6YWF+y9gxx0Opkw0LN2ooQNK+nBYPA8t3LRGIpOQrJclBm99pAvUo rEeVgEs+Z9LJUZFAEuqFUO6cSe8jJA3u1kkxdywHaH6PvWt+iiw78h1LZhhrd8lER+0S Ga0LCU1boTL/HZRBAS8pbVBjEytbrBsNb3/rPXnuhdMnNMUSufDZJuxvk8K1y9mR64F6 NgGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=Yoh0Vw5aJSV68oQSDToYUo8gHl5lNF4ftXIM9R4rRuM=; b=Zpv3y9ECwvBKE8+RYqL3eCwBvYS2oKkjeVMRcz05+1gzvM/ohQM5fSakkS6kWYhRQK FcNIe+nE27zziZgqedXpvJG872j1oCXvicjjv5wNOM0HEmhg+smKO/097SkpdFKl6Els fkXItF1en1t+nvD571V0Vd9by3aCe2rTQdkeloCoTIvCHPpuSbEjG7mjJwAMkV5VXU54 1tUx9Q9XCFZLs1EPUiMYoHLUkkggyQKvFW9IZUYTLQyM5r0e3v+7TGnh30QYA7feLH3l qabn24hj4hLx57UseGTCxEaxMyGGbD0dtrDefS9mfjA8B0vI2j3YYz/8q/qRLafLZFUP lPZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="bqXN3r/M"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z7-20020a631907000000b003701945e86bsi5268387pgl.837.2022.03.04.11.28.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 11:28:39 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="bqXN3r/M"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 226D42118E2; Fri, 4 Mar 2022 11:11:43 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234117AbiCDOhx (ORCPT + 99 others); Fri, 4 Mar 2022 09:37:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239842AbiCDOhw (ORCPT ); Fri, 4 Mar 2022 09:37:52 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 690191BAF1E for ; Fri, 4 Mar 2022 06:37:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646404622; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yoh0Vw5aJSV68oQSDToYUo8gHl5lNF4ftXIM9R4rRuM=; b=bqXN3r/Ms3YXHPq8CYgFYNz4xHtVCcZRqr73PawwcR7BBCEkCNnA02dWK51dbMFkR6IWAd nvyZaWvcq9DfGFSvm5JlxHGHmBWgIeEUoJPsCzCkWNhj3xpKSHXlGTQjAii7yd2vhk+/gh yWGPnCzomsHswPRm5vwf0FXZVmpjqEg= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-428-1GJVRBkwPBC-lw2fcddsaQ-1; Fri, 04 Mar 2022 09:37:01 -0500 X-MC-Unique: 1GJVRBkwPBC-lw2fcddsaQ-1 Received: by mail-wm1-f70.google.com with SMTP id 187-20020a1c19c4000000b0037cc0d56524so4222693wmz.2 for ; Fri, 04 Mar 2022 06:37:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=Yoh0Vw5aJSV68oQSDToYUo8gHl5lNF4ftXIM9R4rRuM=; b=d/W8CUtkPNIALcWD1G5vRXNloz99fmkp5HLJ7pSnJyZufvqAmKfpdq30nhoPcd3Qyh T9UDKzGDAagXqzf48/+0InOpEQL7pbbjohOYWsdPyALuwC8g3fdGhqKEgGNAn7/bdtQg G9N7ocE3TlhwZDPVDce9skvi5X+IR1xdjCrrzWRP7+5DpyEhU9rz3oCY+lVi3BMxU/Ej w8PPkXPXxgPfkR6t4QCcA6owUtPWW876GhfIGLW21Q1zF5/t/F0+0VGII3guYcz4t2bp uWbvN9uOZivGgBxTgylSiWL5iNtX4DcUhPG4vkxMwkatRV4mauub5GPIq3GM86NNPIzD dKWg== X-Gm-Message-State: AOAM530jLl8aup+o9UuZvRy3uZU8j1YT9uPE2HhElUAQqmXibo7SujuU 8z604+LPuK28qk2w4qFmXEcawaA9qIJAMYIAjA9HQYlG6JrPXRugRts7Quts2IBYOC6QtdBhJTP 0hZNbwaEIp83mG+ZkJLjY7JyN X-Received: by 2002:a5d:6c65:0:b0:1f0:46d0:995c with SMTP id r5-20020a5d6c65000000b001f046d0995cmr8561067wrz.457.1646404620235; Fri, 04 Mar 2022 06:37:00 -0800 (PST) X-Received: by 2002:a5d:6c65:0:b0:1f0:46d0:995c with SMTP id r5-20020a5d6c65000000b001f046d0995cmr8561057wrz.457.1646404620038; Fri, 04 Mar 2022 06:37:00 -0800 (PST) Received: from ?IPv6:2a0c:5a80:1b14:b500:abb:f9d1:7bc2:3db8? ([2a0c:5a80:1b14:b500:abb:f9d1:7bc2:3db8]) by smtp.gmail.com with ESMTPSA id f11-20020a7bcc0b000000b0037e0c362b6dsm5052933wmh.31.2022.03.04.06.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 06:36:59 -0800 (PST) Message-ID: Subject: Re: [PATCH] tracing/osnoise: Force quiescent states while tracing From: Nicolas Saenz Julienne To: Daniel Bristot de Oliveira Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, mtosatti@redhat.com, paulmck@kernel.org, rostedt@goodmis.org Date: Fri, 04 Mar 2022 15:36:57 +0100 In-Reply-To: <78d798aa-388c-70bc-4227-985ba76c1d7e@kernel.org> References: <20220228141423.259691-1-nsaenzju@redhat.com> <78d798aa-388c-70bc-4227-985ba76c1d7e@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Fri, 2022-03-04 at 15:28 +0100, Daniel Bristot de Oliveira wrote: > On 2/28/22 15:14, Nicolas Saenz Julienne wrote: > > At the moment running osnoise on an isolated CPU and a PREEMPT_RCU > > kernel might have the side effect of extending grace periods too much. > > This will eventually entice RCU to schedule a task on the isolated CPU > > to end the overly extended grace period, adding unwarranted noise to the > > CPU being traced in the process. > > > > So, check if we're the only ones running on this isolated CPU and that > > we're on a PREEMPT_RCU setup. If so, let's force quiescent states in > > between measurements. > > > > Non-PREEMPT_RCU setups don't need to worry about this as osnoise main > > loop's cond_resched() will go though a quiescent state for them. > > > > Note that this same exact problem is what extended quiescent states were > > created for. But adapting them to this specific use-case isn't trivial > > as it'll imply reworking entry/exit and dynticks/context tracking code. > > Hey Nicolas, > > While testing this patch with rtla osnoise on the 5.17.0-rc6-rt10+, when I hit > ^c on osnoise top, the system freezes :-/. > > Could you try that on your system? Yes of course, I'll get a build going. Were you using nohz_full? -- Nicolás Sáenz