Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp799001rwb; Tue, 4 Oct 2022 10:44:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6wGAeCfuXjmSoVhF88XKWByqSJMuq8SjA50GAOXAr4Ru7RBY0T3x64ZBp1jt9RS9F/Jf/f X-Received: by 2002:a63:66c6:0:b0:440:5ed1:b400 with SMTP id a189-20020a6366c6000000b004405ed1b400mr22013711pgc.605.1664905473042; Tue, 04 Oct 2022 10:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664905473; cv=none; d=google.com; s=arc-20160816; b=eK0PheK7oAkAV2l6UWPDFF2XSsOFeAvyZXy2SNuHXt/rINVYZxlD/ZLHPobsw7YBOP wCx2imhhP/TDuxFK1YgTCDe0zqEU0rJuR0zWy9wDky6fYcj7MglL1qdH8nToJoXM268L Z9epuc86KiOFOiJQ37o3MynW4zE9S6SxdA1E2SBAx1BDhS/PTCZ7usobSaZN5wDmxNI7 IV3AThN1+C/0M0j47DzJEF89oN87jtNv1UXOiK4We78V3kcGn4AMg0byqJDoX/+ehTaN wo9jPi+qTHf4g2YlXMyohoHhnMAGoCrCtsoVacGHw2PVQbKVz1CtDqWQw63FsNbKcoTs 8fsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bh6vzn8U2ZsRPHfJfbA7bhjBG4wiyjRnctJShcuE7JE=; b=NuBQ0UDG5XRg7/8bFfZ70YqgkdUb8y/h+EkyKb5O2X+3wH2Wxk4rMyhcI2mlF22lpi f1nnNsZScPeSgF88vxNjc4H2mYoTOzeiTeZAAJfgBwXsFqc3Z7IAxjvfmBIpv0XwrPoD 7y7XQ9k7heixUti8gxhkyhIm8nfsWD70EL4QZNc/iqzCv0wiacfhw/Nofsq1W2OXOqs6 CRnI8VtW9XQV9+I4Mc6vFTWBeTVvJlpVmIAxyH2wZ4xTG3/ur3Nakws1DMXs3qZ8JlKX UOLHhdzSWiKWb2a15TeC7sPY1g68EX5vqPgj5fKcwCd2XACD96n+13pnh6LsFmGvNj/B QNmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=JRMyjcoK; 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 p12-20020a170902e74c00b0016f1781307csi15403436plf.303.2022.10.04.10.44.20; Tue, 04 Oct 2022 10:44:33 -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=@infradead.org header.s=desiato.20200630 header.b=JRMyjcoK; 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 S229659AbiJDRWN (ORCPT + 99 others); Tue, 4 Oct 2022 13:22:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbiJDRWL (ORCPT ); Tue, 4 Oct 2022 13:22:11 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3537F25E4; Tue, 4 Oct 2022 10:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bh6vzn8U2ZsRPHfJfbA7bhjBG4wiyjRnctJShcuE7JE=; b=JRMyjcoKG+yIJiGewfyyQAtrjO +3HGkg6/t4G8yG1oqVaDcCpbW5UJyAcbjxl+3s0Jme4pbspT+Vn1xcYm97DBMXPqkiVR9Raca/wMy JIJVmnq1SWOmevqTgoZPEQs7QDRhPbXwJsZwMoY9nouvE02fR8Xc8rMBIfQ3UF+6mjQBWlwAUkpov hPhw94mut02zlHzjTflobIrVPfq86AXnXQ2bJ/twHRNixh3mgadiuZcrLTX9WUDDQWArcqLeGhOUQ K14xm/hbXF5z0nXYxwJaP8V2teTXrUyQqzJA2ZCTi4Wsewll87G1FFVp1SQKzCYXi2a8nuWGw3XOV nuTG1mDg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oflc3-000lRQ-4T; Tue, 04 Oct 2022 17:21:47 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 9E23C3002EC; Tue, 4 Oct 2022 19:21:45 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8264920C3AB5A; Tue, 4 Oct 2022 19:21:45 +0200 (CEST) Date: Tue, 4 Oct 2022 19:21:45 +0200 From: Peter Zijlstra To: Marco Elver Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, Dmitry Vyukov Subject: Re: [PATCH] perf: Fix missing SIGTRAPs due to pending_disable abuse Message-ID: References: <20220927121322.1236730-1-elver@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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, Oct 04, 2022 at 07:09:15PM +0200, Peter Zijlstra wrote: > On Wed, Sep 28, 2022 at 04:55:46PM +0200, Marco Elver wrote: > > On Wed, Sep 28, 2022 at 12:06PM +0200, Marco Elver wrote: > > > > > My second idea about introducing something like irq_work_raw_sync(). > > > Maybe it's not that crazy if it is actually safe. I expect this case > > > where we need the irq_work_raw_sync() to be very very rare. > > > > The previous irq_work_raw_sync() forgot about irq_work_queue_on(). Alas, > > I might still be missing something obvious, because "it's never that > > easy". ;-) > > > > And for completeness, the full perf patch of what it would look like > > together with irq_work_raw_sync() (consider it v1.5). It's already > > survived some shorter stress tests and fuzzing. > > So.... I don't like it. But I cooked up the below, which _almost_ works :-/ > > For some raisin it sometimes fails with 14999 out of 15000 events > delivered and I've not yet figured out where it goes sideways. I'm > currently thinking it's that sigtrap clear on OFF. Oh Urgh, this is ofcourse the case where an IPI races with a migration and we loose the race with return to use. Effectively giving the signal skid vs the hardware event. Bah.. I really hate having one CPU wait for another... Let me see if I can find another way to close that hole.