Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751431AbdFZI7U (ORCPT ); Mon, 26 Jun 2017 04:59:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:44225 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751344AbdFZI7M (ORCPT ); Mon, 26 Jun 2017 04:59:12 -0400 Date: Mon, 26 Jun 2017 10:59:07 +0200 From: Michal Hocko To: joeyli Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Yasuaki Ishimatsu Subject: Re: A udev rule to serve the change event of ACPI container? Message-ID: <20170626085907.GE11534@dhcp22.suse.cz> References: <20170626062657.GE4229@linux-l9pv.suse> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170626062657.GE4229@linux-l9pv.suse> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1365 Lines: 34 On Mon 26-06-17 14:26:57, Joey Lee wrote: > Hi all, > > If ACPI received ejection request for a ACPI container, kernel > emits KOBJ_CHANGE uevent when it found online children devices > below the acpi container. > > Base on the description of caa73ea15 kernel patch, user space > is expected to offline all devices below the container and the > container itself. Then, user space can finalize the removal of > the container with the help of its ACPI device object's eject > attribute in sysfs. > > That means that kernel relies on users space to peform the offline > and ejection jobs to acpi container and children devices. The > discussion is here: > https://lkml.org/lkml/2013/11/28/520 > > The mail loop didn't explain why the userspace is responsible for > the whole container offlining. Is it possible to do that transparently > from the kernel? What's the difference between offlining memory and > processors which happends without any cleanup and container which > does essentially the same except it happens at once? > > - After a couple of years, can we let the container hot-remove > process transparently? > - Except udev rule, does there have any other mechanism to trigger > auto offline/ejection? I would be also interested whether the kernel can simply send an udev event to all devices in the container. -- Michal Hocko SUSE Labs