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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0620C7EE2F for ; Mon, 12 Jun 2023 20:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237074AbjFLUFt (ORCPT ); Mon, 12 Jun 2023 16:05:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236421AbjFLUFe (ORCPT ); Mon, 12 Jun 2023 16:05:34 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00BEA1701; Mon, 12 Jun 2023 13:05:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=hbUr7IqiQ3CwOQutnN3C5mnCnB3Aa1KO/Z6mvwxhaXQ=; b=Vik91t3smLbL2recwrIzC/5xF+ 9zcn5hSFQcG/Pd5J0/p93Efq7HL9VQSZEaKObTNsOsKixowTSg4W57cMY4sPoMhcl8XmbQSj1KXGF BLdT52PwoZcpxTa7+lRr+rCvLZIbGTpwNiEUiANtA2UUBnAJpf0b599VycoKA/HWhewocQLpplq/J BCUw1WatyCKS8spARb59yhh7tN9OnYYMsP+owumkx2DmRWsc/tyacQb4086/6LSZ6OZreLTW34E05 Ar/WRLF/fMCfIgDCcszuELxjWhdMrVb20+OaEs7ysm+bd2b06OAbZTleowhXnn87gTxkdhaYXMQv4 VCAlwR8Q==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1q8nn4-0030i5-He; Mon, 12 Jun 2023 20:05:26 +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 99A0D30058D; Mon, 12 Jun 2023 22:05:25 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 782692460EAE4; Mon, 12 Jun 2023 22:05:25 +0200 (CEST) Date: Mon, 12 Jun 2023 22:05:25 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: keescook@chromium.org, gregkh@linuxfoundation.org, pbonzini@redhat.com, masahiroy@kernel.org, nathan@kernel.org, ndesaulniers@google.com, nicolas@fjasle.eu, catalin.marinas@arm.com, will@kernel.org, vkoul@kernel.org, trix@redhat.com, ojeda@kernel.org, mingo@redhat.com, longman@redhat.com, boqun.feng@gmail.com, dennis@kernel.org, tj@kernel.org, cl@linux.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com, adrian.hunter@intel.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org, frederic@kernel.org, quic_neeraju@quicinc.com, joel@joelfernandes.org, josh@joshtriplett.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, rientjes@google.com, vbabka@suse.cz, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, apw@canonical.com, joe@perches.com, dwaipayanray1@gmail.com, lukas.bulwahn@gmail.com, john.johansen@canonical.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, llvm@lists.linux.dev, linux-perf-users@vger.kernel.org, rcu@vger.kernel.org, linux-security-module@vger.kernel.org, tglx@linutronix.de, ravi.bangoria@amd.com, error27@gmail.com, luc.vanoostenryck@gmail.com Subject: Re: [PATCH v3 33/57] perf: Simplify perf_adjust_freq_unthr_context() Message-ID: <20230612200525.GO4253@hirez.programming.kicks-ass.net> References: <20230612090713.652690195@infradead.org> <20230612093539.895253662@infradead.org> <20230612184403.GE83892@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 12, 2023 at 11:55:57AM -0700, Linus Torvalds wrote: > So while it might not be the horrible bug I thought it was, I'd > _really_ like us to not do those things just from a sanity angle. OK, let me go see if there's another way to sanely write those. Is this less offensive? restart: scoped_guard (rcu) { list_for_each_entry_rcu(..) { ... if (err == -EAGAIN) goto restart; } } That has the explicit scope on the rcu and now the goto explicitly exist it. Gonna have to think what to do about the continue ...