Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6299909ybl; Wed, 15 Jan 2020 02:16:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwlbZlnU1CX6dALD8y7povBJEipdqhma5oKIfWhNb2kFKZTH8BD36sMeYRITdyI1QmP50BG X-Received: by 2002:a05:6830:1141:: with SMTP id x1mr2228744otq.120.1579083390483; Wed, 15 Jan 2020 02:16:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579083390; cv=none; d=google.com; s=arc-20160816; b=GJT2H+JeUNWcMWareEP78hkhWRdct7dPD+gFZISClafUMKrTNIkY8dNZuUhXtNDV2e Z4Z0s3rmLmnRgqpHLg5G2aCVWqQFSoYw6rIGacpdREGCb8bHaroxGb6rNoC0yqmA+18M 5TQXJ1681fkrsFqlQdIQ8jOx5ReHclVc6ZLXOU4hM92tyx888gWc3uwHT3EWaVRVo2+q C8egUbYfgW7d1jmvKtJukBUFkCAOeEz1304XK5V3tGHF9DEwYchgZwbWWeMGez1eSUEk KqCSbWFjI0du++/2hHpd/CxhPx4GqRpYd+NBzMxQ3FemkMTJrb3foJ3HfqJZrm2evMt2 lzfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=6VS4bwJIqB7jGZdJOBhUkEWIUojD7i85BSamUqOsOHo=; b=B41K/ib5Hi2bfBYUr2Y74g1cB970BcL7s4Fkhu52hJ3hO0vLZ8v0aWRhJN+rtgdw7f uymA/PENK4me42AzVG9pj9yCzYTYTlxfEvwPSAnll5SZOXJYDp9DHbV/jqzMLKe2YL1I r4Loz2yDGEQnTnb09/wtzjCvyySGsr5BkUkoFGSoeCGykIQQXgTtFEJ6Cpa4aSF8FBW9 z01vQBpqjO73EmorufLWdecfFprtnOFuFXLP2MAOnZijtCgW0+PkcqA1CkYzJDp7ytO/ ALXY9dAPyaW8L8JkE+sjvLLvTgv0ODAkFBj20AEsqTVXXhZYaR9r9Y6pjNDTnypV9M1x R0EA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g138si9772872oib.190.2020.01.15.02.16.18; Wed, 15 Jan 2020 02:16:30 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729652AbgAOKPL (ORCPT + 99 others); Wed, 15 Jan 2020 05:15:11 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:52147 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729585AbgAOKPL (ORCPT ); Wed, 15 Jan 2020 05:15:11 -0500 Received: from 79.184.255.90.ipv4.supernova.orange.pl (79.184.255.90) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.320) id 071a7227e5a6e408; Wed, 15 Jan 2020 11:15:08 +0100 From: "Rafael J. Wysocki" To: Chester Lin Cc: "lenb@kernel.org" , "gregkh@linuxfoundation.org" , "robert.moore@intel.com" , "erik.schmauss@intel.com" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Joey Lee , "mhocko@kernel.org" Subject: Re: [RFC PATCH v2 1/3] ACPI / hotplug: Send change events for offline/online requests when eject is triggered Date: Wed, 15 Jan 2020 11:15:08 +0100 Message-ID: <1702691.vqsIMzBuNn@kreacher> In-Reply-To: <20200103043926.31507-2-clin@suse.com> References: <20200103043926.31507-1-clin@suse.com> <20200103043926.31507-2-clin@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, January 3, 2020 5:40:09 AM CET Chester Lin wrote: > Here we change offline/online handling in device hotplug by sending change > events to userland as notification so that userland can have control and > determine when will be a good time to put them offline/online based on > current workload. In this approach the real offline/online opertions are > handed over to userland so that userland can have more time to prepare > before any device change actually happens. > > All child devices under the ejection target are traversed and notified > hierarchically based on ACPI namespace in ascending order when an eject > event happens. > > Signed-off-by: Chester Lin So you replace the old flow with the new one and make the new one mandatory AFAICS. Thus if anyone has relied on the old flow, they now need to switch over. This is unfriendly and generally unwelcome, so please avoid making changes like that. Instead, I would consider adding a device attribute to allow user space to opt in for getting offline notifications for specific individual devices (by setting that attribute user space would tell the kernel that it wants to get offline notifications for the device in question and it would take care of offlining it as needed).