Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp3162694rdb; Tue, 29 Aug 2023 07:12:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFF7Rs/4t/ubxyR885k6GaYOU8OOmUFxMJxk01a+IQ+BE3RmzDyvRdY+tTR9xruqAHXgNNj X-Received: by 2002:a2e:a3d8:0:b0:2b9:412a:111d with SMTP id w24-20020a2ea3d8000000b002b9412a111dmr22404713lje.42.1693318378503; Tue, 29 Aug 2023 07:12:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693318378; cv=none; d=google.com; s=arc-20160816; b=uUWoWrXDlMeF6gQO244Kf+kYtvPrwoxhd5i95NtclVnVldM0HePiv6i85Bx6uJk+Av 4vOT1e4gZy36JROHBCQog0lx966xxmzfybhJ4aDDYe5DfzF0tXqW4u9LETC+gIgNuhOd OhiVEvHqRa2NaPrtUGx+jw3xjsfHAwsf55xoO8dC4WVZNQcVH8cTyolyMSs9xdXkUD5h jVS7iFs5ECWOONCmQEWRzBJYKx6qihpXgttfXGMJwS7PwYChepo7zBfpRqhcHPssjs97 fozKMlOKEUZu3IkTju9OUUyAG3AHPxsBIGFINvMy5NJ91nCHhZvnLd2EO+0chFR4/LRn luhQ== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=tiBD9YOUgSQKZMn3y9criSPDfI7k2/xGL3ZPjXiUdHk=; fh=REgTo0Zh0+V0Qn+aap2okUEJS3lSvAdYFicuC6Nrx1E=; b=bhTM1bbS2yI5LwUy3I4q7G+nBvxDFy9ES5ihm+ZZHoMB907jNNsr7VLrxs9MZNt6Yw SalwOgDeWJFUQY6mIzcy8u1RR5QEpc87ZlxnVyyRxvASrI2ispeyIck/fwM+MwnbroM3 orCS4vBWopRNPJVpnwsM+hlNYgrI6kd64y+pEcrvyR8c3lTvsbVGpyIP0n5s4dosO0US 11K3XyD91mSrOOCzqZkJNcUoLQ4b4+pi8xvaU5Gp2TT6gA506Q9u09OiPp6GqmJbs1nO 5EuU9b+xOdtqCqBfP7pmh7Ho0hBqAeIfjPYyGu8x3T86u9OSBVrl5sczxsdAWLzcWudc dB1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MiXjKnDb; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay21-20020a170906d29500b00992ca650b77si5886728ejb.416.2023.08.29.07.12.17; Tue, 29 Aug 2023 07:12:58 -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=@kernel.org header.s=k20201202 header.b=MiXjKnDb; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235495AbjH2MjM (ORCPT + 99 others); Tue, 29 Aug 2023 08:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235531AbjH2Mi6 (ORCPT ); Tue, 29 Aug 2023 08:38:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6F0AD2; Tue, 29 Aug 2023 05:38:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 45B5F641AC; Tue, 29 Aug 2023 12:38:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 922A5C433C9; Tue, 29 Aug 2023 12:38:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693312735; bh=7FiVkg6Xp8KzB2AENKpSX0KiHgalTgBxgRn8t+eVVHE=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=MiXjKnDbZ/tS3lFgZALz3DV0JeWr9UZf2ekBg0H0kcvV5VNBr4M3/uIAMbb90GAft csDcSAHN6FkN/ytDtVaHxTGf0xB3+Pw8cgTdtc2OUJ3KQLuvM1DIO2E8u4RKqTIWb/ ROe+VEZon3W8o6I25MAPo3AUdlu7rSgHhCAGY818myXKHov/RwnnT1P9Wn6ZU9BBLB Z7Y2LXJK7BJUTegfcV7Z6YxTiesqtrlG7oSJj/RJiXoZGqOJMJuQtMAJ95xtDskvYn iitgMd4ds+BsOsT8Pmxs6x9BGdhUCdTFG8rOsXgrOHORdMkcoqvVtbkymUNKCEBGZt mvmcR4YDe+o8w== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 21CDCCE1CD9; Tue, 29 Aug 2023 05:38:54 -0700 (PDT) Date: Tue, 29 Aug 2023 05:38:54 -0700 From: "Paul E. McKenney" To: Frederic Weisbecker Cc: Joel Fernandes , Z qiang , linux-kernel@vger.kernel.org, rcu@vger.kernel.org Subject: Re: [PATCH] rcutorture: Traverse possible cpu to set maxcpu in rcu_nocb_toggle() Message-ID: <7ca81dd6-af72-4345-9689-a1ef7dadfa95@paulmck-laptop> Reply-To: paulmck@kernel.org References: <16F11103-75C4-4DCE-8272-D619ECAA96BD@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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_BLOCKED,SPF_HELO_NONE,SPF_PASS 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, Aug 29, 2023 at 11:24:24AM +0200, Frederic Weisbecker wrote: > On Mon, Aug 28, 2023 at 05:51:09PM -0400, Joel Fernandes wrote: > > I think the issue is the loop later in the function does > > not try to toggle cpus that came online too late. > > > > So it does not test offloading on all CPUs just because max got updated too > > late. > > Right, and therefore for_each_possible_cpu() or for_each_present_cpu() > should be fine to iterate since it's ok to try to toggle an offline CPU. OK, so I will accept the original patch which did just that. Thank you! I recently got burned by lack of workqueues on a not-yet-onlined CPU, hence my questions here. ;-) Thanx, Paul > > One fix could be to periodically check in the loop if a new cpu at maxcpu + 1 > > ever got onlined. If it did, update the maxcpu. > > Is it worth the complication though? > > Thanks. > > > > > Thanks. > > > > > > > > > > Thanks.