From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41EEAC43217 for ; Fri, 7 Oct 2022 15:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pcnMNdcrLHPb6c7DQZtAQVe95HmjsI8kkSfgnb3IOrA=; b=mcUIqg/04DV+t6 tv0zEyiLAOyc8oTr1RLuYzmJR3v1CEiJoohv8IrARr1YduWjT28vaUIEyVF8SohPongQ3eNy0uyDG NRbHKZ5oYL2VleXRnzRfsfdWpz4/ze/W8cqJLAEIn+e+3RQCKJM9wJLlod8L9TmrlKmzXTbp82UF3 3Pf9RN1JjJCrSq+qLn+Gc2QCeBfMGcRqOZ9h0PHEqT0VTAf9QKqy4aA3fKslcTHpiHWqkJDbPxmAn bYWcgz1yxeY4Wn++SObXLdf3to5MbT48T089dm27xrKpmzWGAwe9VVkXlZfF9+fbw5YeT/VTSSWRC 5qPWV/TBWT2QFbSBY8sQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ogpYQ-009Ygt-54; Fri, 07 Oct 2022 15:46:26 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ogpYB-009YSv-4L for linux-snps-arc@lists.infradead.org; Fri, 07 Oct 2022 15:46:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665157570; 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=V8NlfJJNnBH1Hg+bNlEeNOaLSp643edXbrFkYOuHdj0=; b=bQ6hPGYo4FsYj8QPFvMdssGyeKTiMFuyGpseGcUi9Oz5qPshPYgmoNZvvM0C9Yy7STerd5 jO9HKBjAWMyU/b5ngjI6kx7AO/3SYiWmrLNLyzRjyKX7L2n6uJJVfClXAn6+9fSg0qTvQE Qy1MIzSF9ygKP5Lbmbgz3i4ytg0qX0E= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-161-Mfxrh9CzMcSDhtSfZCb3TQ-1; Fri, 07 Oct 2022 11:46:09 -0400 X-MC-Unique: Mfxrh9CzMcSDhtSfZCb3TQ-1 Received: by mail-wr1-f72.google.com with SMTP id s5-20020adf9785000000b0022e1af0e7e8so1589904wrb.11 for ; Fri, 07 Oct 2022 08:46:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V8NlfJJNnBH1Hg+bNlEeNOaLSp643edXbrFkYOuHdj0=; b=s1jkNy3s+bOvmN2SQMAb7m1qX/0Gdl0IB7wOGakYUHugD+w2KNDbDGoKoudxq/RJoj YzE0HqWYho9mZBNsF7q+Xq08SdAT0IuNDtYLRTYC++faaF6lsezyrNlvWcHnszG7Jtu/ Nh4VceWmOTvM8PAMAisFcO/Y3kUrQyCkfrx14+IvyzsdC/v4/N71Jy+3DKXqZJ7EVfY4 fxAhN/3snuQs1kol7nWTUUGgI/G2insC/SQ2ggxOkP0GzehYq7FB/LECJQeQlEeyjguf /u4QuXOTgIPGYH6PuDUpK/KBKU8BilE6fxK9Olyi19pjg+Lf0k7/Epq1SWN8pupAiFY3 yOLA== X-Gm-Message-State: ACrzQf1hYcgj6wA6CijpFtwwjo5WudoQnzTnuF4bDBDZO3ZXYL3/MIsz bsmyHzuVnUBjsi5GitRsdSQxX64/ESqEzA/8dC5SRtIcYngioopTYIIpmcqtAMLccRG85MLNp8k AFPaJfs93nBJKSs4jwyhu+fkz+oP97HMT X-Received: by 2002:a5d:64cd:0:b0:22e:2fc1:9511 with SMTP id f13-20020a5d64cd000000b0022e2fc19511mr3566267wri.415.1665157568161; Fri, 07 Oct 2022 08:46:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4t9ram8oou3fr6TpdC1R8We+758fvnnqCUt2NCTCIakvPHOGi5POwCK/ARZj0LE9PFnGcXMg== X-Received: by 2002:a5d:64cd:0:b0:22e:2fc1:9511 with SMTP id f13-20020a5d64cd000000b0022e2fc19511mr3566217wri.415.1665157567961; Fri, 07 Oct 2022 08:46:07 -0700 (PDT) Received: from vschneid.remote.csb ([149.71.65.94]) by smtp.gmail.com with ESMTPSA id i18-20020adfb652000000b0022e38c93195sm2339428wre.34.2022.10.07.08.46.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 08:46:06 -0700 (PDT) From: Valentin Schneider To: 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 Cc: "Paul E. McKenney" , Steven Rostedt , 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: [RFC PATCH 4/5] irq_work: Trace calls to arch_irq_work_raise() Date: Fri, 7 Oct 2022 16:45:32 +0100 Message-Id: <20221007154533.1878285-4-vschneid@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221007154145.1877054-1-vschneid@redhat.com> References: <20221007154145.1877054-1-vschneid@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221007_084611_273079_AB757FB8 X-CRM114-Status: GOOD ( 16.23 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org Adding a tracepoint to send_call_function_single_ipi() covers irq_work_queue_on() when the CPU isn't the local one - add a tracepoint to irq_work_raise() to cover the other cases. Signed-off-by: Valentin Schneider --- kernel/irq_work.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/kernel/irq_work.c b/kernel/irq_work.c index 7afa40fe5cc4..5a550b681878 100644 --- a/kernel/irq_work.c +++ b/kernel/irq_work.c @@ -22,6 +22,8 @@ #include #include +#include + static DEFINE_PER_CPU(struct llist_head, raised_list); static DEFINE_PER_CPU(struct llist_head, lazy_list); static DEFINE_PER_CPU(struct task_struct *, irq_workd); @@ -74,6 +76,14 @@ void __weak arch_irq_work_raise(void) */ } +static inline void irq_work_raise(void) +{ + if (arch_irq_work_has_interrupt()) + trace_ipi_send_cpu(_RET_IP_, smp_processor_id()); + + arch_irq_work_raise(); +} + /* Enqueue on current CPU, work must already be claimed and preempt disabled */ static void __irq_work_queue_local(struct irq_work *work) { @@ -99,7 +109,7 @@ static void __irq_work_queue_local(struct irq_work *work) /* If the work is "lazy", handle it from next tick if any */ if (!lazy_work || tick_nohz_tick_stopped()) - arch_irq_work_raise(); + irq_work_raise(); } /* Enqueue the irq work @work on the current CPU */ -- 2.31.1 _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc