Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp584202imw; Fri, 15 Jul 2022 09:00:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uoq2pGECtr4E0YzSqO5RkLeGCZNnaZH9zV7yAsxdAUN0gjD6yqmORuiE46Jniaei/X38/C X-Received: by 2002:a05:6870:d215:b0:f2:5fc9:6492 with SMTP id g21-20020a056870d21500b000f25fc96492mr7723324oac.112.1657900845575; Fri, 15 Jul 2022 09:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657900845; cv=none; d=google.com; s=arc-20160816; b=KxzGp1TPMqAqQ/FhtG0/GdjhsLHyj6Fxq9zjsLlxoEdSUxitpQ+/7WR2o1u5nFvXDp M2vKXzi8lMvKFVDTz8ko6pyYSAZliXVd47yHI2WJPJt7NkCa2ZshSVeIa9yg1b1pbQ9J p7sxXXHQfjI0JJIykKKGRjzxwTXefU8UQzjDObyOgTrZzOoLd/05VlbNi3yqxIJdjFt5 RlZm483tQO5OaLzlhYRx0Q6RCX7dAHDYWvS/h9hMNPl6a7EBKVFoxXOQR+yw6JHvq3L0 hiDzS8RCUEeS0CNhBK9/gWXeLRDKbepbiRV3W/hPNeN8aqSGm+LSkg5dAaXFhm4t+LFC dL2w== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=/t5pGVbZUr3IFvqBc72I2/tMZAo2BjVlpArbSE2296s=; b=bzkhaeHYY+HPCr3+9jQvDKWNo9e9mRUVHtpfzttgVXXPf97mul3D0UxLJErjy8Ca8+ mZ9v490jfyrAx/w+rfGUX4SNISow1z34LbxVPXwRKs7P3WXdj7Hl+td+uSmYdLPVs5Z5 kffBdGTtboFs+ko/xM1nB44uh/HN3b+OafA5xIVY83dEp7OQ+wF4hNmaLSqB/pWtYGVG OgqDd77YpH6kaBK9KFwONMrPdsXohZ5mG27SwgcQexh+qiBjOm/AkAlgaDqX6SnMV9Du ssZZ7wR8OH3uo8ZgOwlS7oJSqb8qDksOLcOX6GVV5ZRwCbiHPnfb3TYCdI8H4FLj7LaF UvFA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a0568301e9000b0061c53b874dasi2767185otr.232.2022.07.15.09.00.31; Fri, 15 Jul 2022 09:00:45 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231844AbiGOPC5 (ORCPT + 99 others); Fri, 15 Jul 2022 11:02:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231818AbiGOPCz (ORCPT ); Fri, 15 Jul 2022 11:02:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DCB27B343 for ; Fri, 15 Jul 2022 08:02:54 -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 ams.source.kernel.org (Postfix) with ESMTPS id E698CB82D07 for ; Fri, 15 Jul 2022 15:02:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35024C34115; Fri, 15 Jul 2022 15:02:50 +0000 (UTC) Date: Fri, 15 Jul 2022 11:02:48 -0400 From: Steven Rostedt To: Petr Mladek Cc: "Paul E . McKenney" , John Ogness , Sergey Senozhatsky , Marco Elver , kasan-dev@googlegroups.com, Thomas Gleixner , Johannes Berg , Alexander Potapenko , Dmitry Vyukov , Naresh Kamboju , Peter Zijlstra , Linux Kernel Functional Testing , linux-kernel@vger.kernel.org Subject: Re: [PATCH] printk: Make console tracepoint safe in NMI() context Message-ID: <20220715110248.02b294b7@gandalf.local.home> In-Reply-To: <20220715120152.17760-1-pmladek@suse.com> References: <20220715120152.17760-1-pmladek@suse.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 Fri, 15 Jul 2022 14:01:52 +0200 Petr Mladek wrote: > + /* > + * trace_console_rcuidle() is not working in NMI. printk() > + * is used more often in NMI than in rcuidle context. > + * Choose the less evil solution here. > + * > + * raw_smp_processor_id() is reliable in rcuidle context. > + */ > + TP_CONDITION(!rcu_is_idle_cpu(raw_smp_processor_id())), > + As Marco mentioned in the other thread, would a check for 'rcu_is_watching()' be better? -- Steve > TP_STRUCT__entry( > __dynamic_array(char, msg, len + 1) > ),