Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7210579ybc; Thu, 28 Nov 2019 13:08:13 -0800 (PST) X-Google-Smtp-Source: APXvYqzuVFQ2f005WdY8jHhKqQ4758WmVD0Z4zsVBBZ2anN38pSfTl0edspvbmbplpl4zMQRkJ/+ X-Received: by 2002:aa7:cf19:: with SMTP id a25mr34186039edy.237.1574975293578; Thu, 28 Nov 2019 13:08:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574975293; cv=none; d=google.com; s=arc-20160816; b=ulvejOi0YirMK1DY7wLbfbsENt+9M0JNC5bR5ZZjEJd+8HH0pe+xfD0iFvMQlTs6Fs X6QA0xmvwi30eHuT4jQIUbo7B43FHQEcbrYv30nD00x8hE1nL7XiqSPEhbOG1R0lKHPm dn5TdP5ctq9pqNEUC24rAsMNvutQdvFi45opzRBtvTwXPknp8xUzLTHem/tUiBXylDgm rPDhvxBM0cC75V/QRPBB66Ct6uVqvHA54Dt9OD5Lpvi+3mNR34O3taoxjZ5nn776Etwh 2oPrQfhkVOWLBPtuL5PGn3IufVLZoG262MoyWNQNgcH0HEoUjepr3TpP+7L2ZUbXgub6 dagQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=4sP3iAde56hJCsslep7wx7ysWHnj6+7BlcGjA+gvAUM=; b=0aPA9ejLZtuALQHOCRCSLGphTaEmiaHn+6L5W50VzlakiIgTFo74kqiWW+ImcgaVQL Vcp6NLR9Q32DSO+MYo9zOLL4+yn+u9gFSQQjrpWXLUrclP8tZnGCHUHRC4JhGjEepwhb CPha/fT0TrjfH72l/SWJeyJQ8J9tJfp6IxG8ywIsqCJxA2nDuqcbKhvd/qqAgEJsIuMj kh4PLe/n0uVGtBQWiCfwpBidV8zgc4EJvG801Jdea9QMa2NK+0zLzXjrEIpcXJ5JDxrB 6CUCpnv2QGAhVfmeMixyL2ttgz1oTleP4N7PYq2EKsJNXqTsl1bL9rtiq60tJO/8+Cu9 62hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=L2QkWHLE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8si16290230edd.373.2019.11.28.13.07.14; Thu, 28 Nov 2019 13:08:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=L2QkWHLE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726609AbfK1VCr (ORCPT + 99 others); Thu, 28 Nov 2019 16:02:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:47168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbfK1VCr (ORCPT ); Thu, 28 Nov 2019 16:02:47 -0500 Received: from paulmck-ThinkPad-P72.home (50-39-105-78.bvtn.or.frontiernet.net [50.39.105.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F3F0221775; Thu, 28 Nov 2019 21:02:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574974967; bh=lY7vOVucF5Go0+wTfxz1i3Kyw0d35VGMD4/2aYwSaEg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=L2QkWHLE8WI/Cb6RqQwzA+aEA/cw8Ba2BFn2KABgIRt6wALTgf/QYK2BPYKIslDPl 9TIf/uEBz2WbgS0HtBoH8/1YnoZfR+7aww40ZqfSVGSp6HGfu4MqO6ndLNGhNnD9jz 8Rl3D7wMytY+tg20XCQsGiyVQg9BPG4gNUBa6IGQ= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id D041D3520BDA; Thu, 28 Nov 2019 13:02:46 -0800 (PST) Date: Thu, 28 Nov 2019 13:02:46 -0800 From: "Paul E. McKenney" To: Qais Yousef Cc: Thomas Gleixner , Greg Kroah-Hartman , Davidlohr Bueso , Josh Triplett , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 12/14] torture: Replace cpu_up/down with device_online/offline Message-ID: <20191128210246.GJ2889@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20191125112754.25223-1-qais.yousef@arm.com> <20191125112754.25223-13-qais.yousef@arm.com> <20191127214725.GG2889@paulmck-ThinkPad-P72> <20191128165611.7lmjaszjl4gbo7u2@e107158-lin.cambridge.arm.com> <20191128170025.ii3vqbj4jpcyghut@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191128170025.ii3vqbj4jpcyghut@e107158-lin.cambridge.arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 28, 2019 at 05:00:26PM +0000, Qais Yousef wrote: > On 11/28/19 16:56, Qais Yousef wrote: > > On 11/27/19 13:47, Paul E. McKenney wrote: > > > On Mon, Nov 25, 2019 at 11:27:52AM +0000, Qais Yousef wrote: > > > > The core device API performs extra housekeeping bits that are missing > > > > from directly calling cpu_up/down. > > > > > > > > See commit a6717c01ddc2 ("powerpc/rtas: use device model APIs and > > > > serialization during LPM") for an example description of what might go > > > > wrong. > > > > > > > > This also prepares to make cpu_up/down a private interface for anything > > > > but the cpu subsystem. > > > > > > > > Signed-off-by: Qais Yousef > > > > CC: Davidlohr Bueso > > > > CC: "Paul E. McKenney" > > > > CC: Josh Triplett > > > > CC: linux-kernel@vger.kernel.org > > > > > > Looks fine from an rcutorture viewpoint, but why not provide an API > > > that pulled lock_device_hotplug() and unlock_device_hotplug() into the > > > online/offline calls? > > > > I *think* the right way to do what you say is by doing lock_device_hotplug() > > inside device_{online, offline}() - which affects all drivers not just the CPU. Or there could be a CPU-specific wrapper function that did the needed locking. (Whether this is worth it or not of course depends on the number of invocations.) Thanx, Paul