Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5696711imw; Wed, 20 Jul 2022 10:33:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sGAo3+1OraBWFk/t21Vqw6slTMJR7w10247skeD7TEEtjZUFc2BK1gOiUJAGi5Us36BNMg X-Received: by 2002:a17:907:b04:b0:72b:5cf4:4631 with SMTP id h4-20020a1709070b0400b0072b5cf44631mr37622978ejl.180.1658338409583; Wed, 20 Jul 2022 10:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658338409; cv=none; d=google.com; s=arc-20160816; b=suKB+zusrKsN04ZTzRJrkZVPHYWtrmPTwnKPLw3BzfGRMfkDOF9EavnKb3Pt1syB47 hcQn+oqzzkrzLraLdEYsrn49oicTm62nZuJ7uwaaL3E9Vwtgckss/K1sNDqYn8qoJPtx XpD18KP9Kx7ySsREtSmC7Xe6U/+ulJvQL5XiZWVexii00HYwwU8L7a6oUFdXGAwONW9N pif2u8+z4z1+bXuPr8H7qls832xZSa3xYSpqP6gi3JiV7EZT1wL6tViUskU1LHZAs0w1 KrW4SSgq6Jslz0EF7vLgCmfsIE294jRq7kUTporN8wW3EwU1ED+LeHRudEjXPvR4Xi8U K5TA== 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=k8Jc5MmkGAZCvfkEwK50IKKJNGEPK2sNwk0T1sUgsFY=; b=uNRkAfDFfp5RO9BjxS7AmKyzFNNnBmGvEQLleO68d7NEmaLr9XxyvZ/EsGnzq3QFxy bjp9zxQ6KkjavYpT2qDfH3ZesJWItOybUTUpHvWxcsLXCAO2rauHN8eKsfBCSKRruBLj 1Woy3bWvJuP4FAnYMPz12/5mFvSudO/QUcZe4vX0M7JakpwnEEOfd+gOGbV/sxTiGrdC tNxPzRH4l1hJKPHhAI8vVVoDyyC7zhaFUg6foKud68TuWb1zbjm4WXWccaSbKLlV3+Mi R1q5anl0ce0lC7jr8WpPbxzvjSqeix4WKYQw6Ulj81hcVXUo0nHpq1B4jGEG7qpNMnxk 9wGg== 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 hc44-20020a17090716ac00b0072a51fa07a2si26947572ejc.296.2022.07.20.10.33.03; Wed, 20 Jul 2022 10:33:29 -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 S230055AbiGTQln (ORCPT + 99 others); Wed, 20 Jul 2022 12:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232006AbiGTQlm (ORCPT ); Wed, 20 Jul 2022 12:41:42 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DD424F670; Wed, 20 Jul 2022 09:41:41 -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 sin.source.kernel.org (Postfix) with ESMTPS id ACDF9CE218F; Wed, 20 Jul 2022 16:41:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF5E5C3411E; Wed, 20 Jul 2022 16:41:35 +0000 (UTC) Date: Wed, 20 Jul 2022 12:41:33 -0400 From: Steven Rostedt To: Daniel Bristot de Oliveira Cc: Wim Van Sebroeck , Guenter Roeck , Jonathan Corbet , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Will Deacon , Catalin Marinas , Marco Elver , Dmitry Vyukov , "Paul E. McKenney" , Shuah Khan , Gabriele Paoloni , Juri Lelli , Clark Williams , Tao Zhou , Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org Subject: Re: [PATCH V6 02/16] rv: Add runtime reactors interface Message-ID: <20220720124133.3cdd2c44@gandalf.local.home> In-Reply-To: <4b5f93e3186b067073c1692d4c2b50d0b42101d5.1658244826.git.bristot@kernel.org> References: <4b5f93e3186b067073c1692d4c2b50d0b42101d5.1658244826.git.bristot@kernel.org> 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 Tue, 19 Jul 2022 19:27:07 +0200 Daniel Bristot de Oliveira wrote: > +/* > + * reacting_on interface. > + */ > +static ssize_t reacting_on_read_data(struct file *filp, > + char __user *user_buf, > + size_t count, loff_t *ppos) > +{ > + char *buff; > + > + mutex_lock(&rv_interface_lock); > + buff = reacting_on ? "1\n" : "0\n"; > + mutex_unlock(&rv_interface_lock); Again, no need for the locks, but perhaps just to keep things sane: buf = READ_ONCE(reacting_on) ? "1\n" : "0\n"; -- Steve > + > + return simple_read_from_buffer(user_buf, count, ppos, buff, strlen(buff)+1); > +} > +