From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751539AbdKUX0o (ORCPT ); Tue, 21 Nov 2017 18:26:44 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:38678 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbdKUX0n (ORCPT ); Tue, 21 Nov 2017 18:26:43 -0500 Subject: Re: [PATCH 4/4] ARCv2: entry: Reduce perf intr return path To: Vineet Gupta , Peter Zijlstra CC: , Newsgroups: gmane.linux.kernel,gmane.linux.kernel.arc References: <1510092784-19942-1-git-send-email-vgupta@synopsys.com> <1510092784-19942-5-git-send-email-vgupta@synopsys.com> <20171114102802.GA3165@worktop.lehotels.local> <8b2c70f0-fc51-fb9b-b799-9b85a3d3403b@gmail.com> <20171115101853.mtpamwkc5z4ptw2h@hirez.programming.kicks-ass.net> <4a28d9dc-b322-1a79-b1d1-c13db2f01ee7@synopsys.com> From: Vineet Gupta Message-ID: <64e093da-1778-f1ea-9eae-a1c2ce29556d@synopsys.com> Date: Tue, 21 Nov 2017 15:26:32 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <4a28d9dc-b322-1a79-b1d1-c13db2f01ee7@synopsys.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.161.62] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/17/2017 03:42 PM, Vineet Gupta wrote: >>>> What do you (on ARC) do about irq_work ? >>> > >> So the reason I'm asking is that some architectures that don't have NMIs >> call irq_work_run() at the very end of their perf-interrupt handler (ARM >> does this for instance). > > But on ARC, we don't call irq_work_run() in perf intr return path and that seem to > imply it is broken - as in latency to service a perf induced preemption. [snip...] >>> Although I'm sure it is, can you please explain how irq_work is relevant in >>> the context of this patch. >> >> Since the perf interrupt (in general) cannot call a whole lot of things >> for it needs to assume running from NMI context, it needs to defer >> things to a more regular context. It does this with irq_work. So given my understanding of this topic, ARC (or any non NMI based perf intr system) is potentially broken without irq_work_run() ? I can follow up with a patch for ARC, or does this need to addressed for others too - say irq_exit_perf() or some such ?