Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp302150rdh; Wed, 7 Feb 2024 05:25:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRzZeGaxrI6PoMjrZ0eMdvyzVY/VEROjVG4Mhy88desIjt/YGMOYTENa2tcr+MASpA0Nsd X-Received: by 2002:a05:6a00:1783:b0:6e0:535f:b72e with SMTP id s3-20020a056a00178300b006e0535fb72emr3567132pfg.34.1707312302701; Wed, 07 Feb 2024 05:25:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707312302; cv=pass; d=google.com; s=arc-20160816; b=z0Tfxo+1ViCRo0DJ2rPMmcn/LW2G5Lbw4Ox8WH94bttx4NaHLoSauDOYKifyPHSekE vwztU92mhyQ1GrbM2yRlH1aze6r9FAcOyD4edXlBBsuCMhgDkrTura/4DXF9nu8VvPm8 1MDJggIxbcikuQfpm7g7DNqxU/8DkfOuwYxbNq6mnW9bfXi6RTNCzzXsYrG4YsCU2Fuh HnOmREiKwr/AJWO3yE67jUYeh31kez3DyHc4VMrN3qK+SKMVJa1R8JEqV+7WAL3t3qlA nPpKFCTadEldDzdvlTwMm4AlUQivoXb8GtsXKu+6HdxNwekWv3js1zBBj9QtJws2/IKt lgvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EQl+1OPBUOY108zNM8zP33G1TVH+klQDZcHPJb7jUZ0=; fh=/MHYUBlkvVlyP08QQ0PcL6j4h8i8C6MNvm06H9fLXog=; b=U41UuXkcAEQJgXUgCKG3dcV4ejKdN14unhWpE1CkzB7PAxOtzlUWHsYUfm2l4Ivom4 r65qtWg0SJa2sSVPPWiDj4n63w4cTk2IA0NvbYRdw/WbMHELiSMaQAWAxgFowiePcOfI mBs0vqHwUa2Mu9cFkri7ihWEBPtMMPiRYFCsgFk7Ya8dGvcGtkqZaV0+J2/GA1bEUVCC PYSD4TpHBV/ALsp19u1cYzdSZ1E9C34PxhA3NPd14KoSiyZ3QjpJ5z/ePaB4L20QLFMg onZsJ4k7/erahLLykKrU7t7SGOxk8iYCYvBslK8tolNTapfE5pYyZUsBy5gxUg5m1GLQ UtNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aQYOLSqU; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-56527-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=2; AJvYcCVWsK9GZLOin8VnRpWp/RviLKby99VMvjCo/dH6RQRToWNItpUpKH9JIO7TUwHwVUee/hZ6wkGfZNGxc7+9zPM5GQkqOvxNi9ZZl/pDCA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e26-20020a65679a000000b005cecb6a1027si1517507pgr.702.2024.02.07.05.25.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:25:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56527-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aQYOLSqU; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-56527-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 16A8128FFF3 for ; Wed, 7 Feb 2024 13:13:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D41131B7F4; Wed, 7 Feb 2024 13:12:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aQYOLSqU" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E9B776C8E for ; Wed, 7 Feb 2024 13:12:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311552; cv=none; b=pCK4n8500Lf8qy7ZN+2/BXYepRkTFldoIPDg13/VqWSLfr4bj6oeTCTGUVAvi+YCApnYwAlkHrCEtoXreXLBPfuVij/JSSo6lZ5Y5YltHxzw6fpVFTAcpYHY0Yz61Hj4Lro0LNzNo16V4tUP4EujP2JRsu/DEVB3KQzxwLifkDA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311552; c=relaxed/simple; bh=gAMRtlwIMizV7xaoFhPeVklB/rXaMNHkjdsTcVxZjBw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rZ3fRJLDKkJsRnqkziK2pnCj8uxL4rKTkCac7fh56Dr3Xwz4JZrWKrvx+PVVrPtUBd3GBlE2zJLG/KlSbTYPoLrZwWMpD0X6aqJ4S2neao+zgtC98SJnq8j7dLDmaBDDWjP3VzQ0NPvx5OYtKkUeLlUT11Jh2eEPf9XYHoscEJA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=aQYOLSqU; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707311546; 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: in-reply-to:in-reply-to:references:references; bh=EQl+1OPBUOY108zNM8zP33G1TVH+klQDZcHPJb7jUZ0=; b=aQYOLSqUgZnbBDLpLr/Hb4eSTTJwKyirHxaMHTRnAxLTVf9N2L7vt3lJXMDIe+SrOpCWAy OwB+9dI+43Fm+RL2Vpnku59QBv616h48UAZaeEnmOxLTDxJC9Y3Ep7lLLGH254hegO8Sw3 pUvFVin7ljPJrb/JQ5MUxTRUoRfxzxI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-49-jIPqCiCFP6SwIxaswi5wGQ-1; Wed, 07 Feb 2024 08:12:25 -0500 X-MC-Unique: jIPqCiCFP6SwIxaswi5wGQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 64F0385A58A; Wed, 7 Feb 2024 13:12:24 +0000 (UTC) Received: from tpad.localdomain (unknown [10.96.133.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B2F91121313; Wed, 7 Feb 2024 13:12:24 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 7D7804023F55F; Wed, 7 Feb 2024 09:58:04 -0300 (-03) Date: Wed, 7 Feb 2024 09:58:04 -0300 From: Marcelo Tosatti To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Daniel Bristot de Oliveira , Juri Lelli , Valentin Schneider , Frederic Weisbecker , Leonardo Bras , Peter Zijlstra Subject: Re: [patch 05/12] timekeeping_notify: use stop_machine_fail when appropriate Message-ID: References: <20240206184911.248214633@redhat.com> <20240206185709.955049547@redhat.com> <87h6ikmqqo.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h6ikmqqo.ffs@tglx> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 On Wed, Feb 07, 2024 at 12:57:19PM +0100, Thomas Gleixner wrote: > On Tue, Feb 06 2024 at 15:49, Marcelo Tosatti wrote: > > Change timekeeping_notify to use stop_machine_fail when appropriate, > > which will fail in case the target CPU is tagged as block interference > > CPU. > > You completely fail to explain 'appropriate'. There is zero reason for > this churn, really. The churn is so that we can return an error to current_clocksource_store (sysfs handler for writes to /sys/devices/system/clocksource/clocksource0/current_clocksource). Yeah, should probably separate patches that prepare code for returning errors from the actual change between smp_call_function_single and smp_call_function_single_fail (started that for the rdmsr_on_cpu/wrmsr_on_cpu helpers). OK, so i am assuming you are good with the general idea of the patch (and have no better one) which is: idx = block_interf_srcu_read_lock(); ret = smp_call_function_single_fail(cpu, remote_fn, ...); (or stop_machine_fail) block_interf_srcu_read_unlock(idx);