Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2482080rwi; Tue, 11 Oct 2022 09:15:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7mD55mz4tP4RmllJkmlVcFEHcjptctFdrUSFCN3hYPctPiDsCnnbC24PrW7tfV8r/2xDGz X-Received: by 2002:aa7:dd45:0:b0:458:7474:1fbe with SMTP id o5-20020aa7dd45000000b0045874741fbemr23671138edw.334.1665504956699; Tue, 11 Oct 2022 09:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665504956; cv=none; d=google.com; s=arc-20160816; b=kyU3ayE0W4yFQQphS7UycELmqOhylMVI9J1RNyRHkIbmg8sHyHKXGmNrqzjtXvGx0z 73FG06vVsNAXiR09BNgzRB2Coc/sa4dOFh9nrVi03L1Mk7rxMERquYobrpgkDywBfYiO RtEXdmi1sCABbf2iGywtbZpXrmvjs5+1whsoBRGvctGMETBNqEnGyYhbrUI7I/J8vubJ 1/GNVBD/ysaZ+gKTe/wMgYXsQrWkBEqNFgYi/c//IG8WqZpdCBjMUTGJKUZNOswdS09+ Mc4K+F/Ze9jiZ05tcaD25t+aGBeEQRcOH4hdgaGSOYq1UJHI43+RqEgrTKpOBb2IEmGa 6VIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=ti1NCFCTzr5YPwBHvg45c+mfaiUwrR60uA7ep6lLZuA=; b=GaHItslnvCzqBkc9LRydh1YnpfNAKdt94vRYVnvIm82MKFZLSBvGtJGGSUqI+WbLIU fBV8cqrTAxCF8TeEhDJMZAurevVBO100Hi4qQ6oLRapqyqq9KRwkIzJq7pE1/Zrl7t9e pUArxWUrQRoU5oDu3k9XRPmGDTYJ7HTs0GEF6sHA7yqt1hH2P88DFWMMqddwXVzOnnwP M9Y6ibFv4p7MMJOHcLamECoMEOnwzQdEsEe0G2MoPvky4BvmGQj8t04Zisn3GTnhh3I5 JFn17wYcOaGKlyGg6WGSdcdnvkWn4w9oCn3XW2sUdXHuo172P9UsbKQ/YVpXwVQNBOjz I9/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JnAa2pRM; 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 t18-20020a056402021200b00459b04a18e5si12838037edv.435.2022.10.11.09.15.28; Tue, 11 Oct 2022 09:15:56 -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=JnAa2pRM; 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 S229696AbiJKP0P (ORCPT + 99 others); Tue, 11 Oct 2022 11:26:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbiJKPZm (ORCPT ); Tue, 11 Oct 2022 11:25:42 -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 ESMTPS id 6777BDFB58 for ; Tue, 11 Oct 2022 08:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665501360; 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=ti1NCFCTzr5YPwBHvg45c+mfaiUwrR60uA7ep6lLZuA=; b=JnAa2pRMUWiD+yAQqwCL4lttSiTDCC/zzFMxQQISZdtquT+8TRHzAk5S5SKjxCICg+Mh4t hg6wMmryiw6K+1mfzC8DCdZovsQ9T0rrA54tQnPNf4gKbvKpxqabtJHOky0ZA/92GD0ib/ iF0BkXKAghlvEz4gET9tZbArhIAAo4s= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-178-LEgfpuoqOnGTTIg9qfqDcA-1; Tue, 11 Oct 2022 11:02:10 -0400 X-MC-Unique: LEgfpuoqOnGTTIg9qfqDcA-1 Received: by mail-wm1-f72.google.com with SMTP id l1-20020a7bc341000000b003bfe1273d6cso3824568wmj.4 for ; Tue, 11 Oct 2022 08:02:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ti1NCFCTzr5YPwBHvg45c+mfaiUwrR60uA7ep6lLZuA=; b=jSuAr9YMLXrjqozDStjj3rt+i0GOZPTHvOtnT3Rg88wBpttvnsJdlUjYQfC/Hhs4li 23L4861EcsC74gKkHeMik4iUU6AChbqXkYM1rQlUOjcLNlS1TzKiHSEG7kQd8qhwovr3 BcxArOsqt0F1eQNsKO0pOtcx49i4lzgrHAvUiVgVOOxO28QmR8BI4pHOBz33Fr5r8noV sNtPJXf6DsSGqRJsrx1eQjkdzT2UwFLOrsR4OWXf18DJUuZ95lBlnsZvlATYgdlRLFT/ UhfUyLRVUCbhrFjSQv/fejWZLOReJK/Tj0ll10ry0TeshBR0m0wR3bKUl5X2g8kAQ5Zx HKwQ== X-Gm-Message-State: ACrzQf1h/ZKDlI9dljCZfiuFwPESlqQpAgEX5OOpMDHZMtIslc6hFTqO vqDh6h+kNJ7CFR7trx9ooVuJ5y2OUwAqzTB7cZRHBbmTUrYUXnI2l/iH3VhXI5iHVcg1z54xSSS bo5OKQ//6ZLHHUw7D7DgkNc48 X-Received: by 2002:a5d:59a3:0:b0:22e:4b62:7ceb with SMTP id p3-20020a5d59a3000000b0022e4b627cebmr15699181wrr.90.1665500528705; Tue, 11 Oct 2022 08:02:08 -0700 (PDT) X-Received: by 2002:a5d:59a3:0:b0:22e:4b62:7ceb with SMTP id p3-20020a5d59a3000000b0022e4b627cebmr15699160wrr.90.1665500528495; Tue, 11 Oct 2022 08:02:08 -0700 (PDT) Received: from vschneid.remote.csb ([104.132.153.106]) by smtp.gmail.com with ESMTPSA id bh11-20020a05600c3d0b00b003b49ab8ff53sm13552403wmb.8.2022.10.11.08.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 08:02:07 -0700 (PDT) From: Valentin Schneider To: Steven Rostedt Cc: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, x86@kernel.org, "Paul E. McKenney" , Peter Zijlstra , Thomas Gleixner , Sebastian Andrzej Siewior , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Frederic Weisbecker , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Marc Zyngier , Mark Rutland , Russell King , Nicholas Piggin , Guo Ren , "David S. Miller" Subject: Re: [RFC PATCH 4/5] irq_work: Trace calls to arch_irq_work_raise() In-Reply-To: <20221008153442.159b2f2d@rorschach.local.home> References: <20221007154145.1877054-1-vschneid@redhat.com> <20221007154533.1878285-4-vschneid@redhat.com> <20221008153442.159b2f2d@rorschach.local.home> Date: Tue, 11 Oct 2022 16:02:06 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE 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 08/10/22 15:34, Steven Rostedt wrote: > On Fri, 7 Oct 2022 16:45:32 +0100 > Valentin Schneider wrote: >> } >> >> +static inline void irq_work_raise(void) >> +{ >> + if (arch_irq_work_has_interrupt()) >> + trace_ipi_send_cpu(_RET_IP_, smp_processor_id()); > > To save on the branch, let's make the above: > > if (trace_ipi_send_cpu_enabled() && arch_irq_work_has_interrupt()) > > As the "trace_*_enabled()" is a static branch that will make it a nop > when the tracepoint is not enabled. > Makes sense, thanks for the suggestion. > -- Steve > > >> + >> + arch_irq_work_raise(); >> +} >> + >> /* Enqueue on current CPU, work must already be claimed and preempt disabled */