All of lore.kernel.org
 help / color / mirror / Atom feed
From: joeyli <jlee@suse.com>
To: YASUAKI ISHIMATSU <yasu.isimatu@gmail.com>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Michal Hocko <mhocko@suse.cz>
Subject: Re: A udev rule to serve the change event of ACPI container?
Date: Thu, 29 Jun 2017 11:57:36 +0800	[thread overview]
Message-ID: <20170629035736.GT4229@linux-l9pv.suse> (raw)
In-Reply-To: <1f1b0229-84c8-f95f-dab4-76588834b6e6@gmail.com>

Hi YASUAKI,

Thanks for your response.

On Wed, Jun 28, 2017 at 03:53:16PM -0400, YASUAKI ISHIMATSU wrote:
> 
> On 06/26/2017 02:26 AM, joeyli 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? 
> 
> We don't know what devices mount on the container device. I think
> devices mount on the container device are different each vendor's server.
>
> If memory device mounts on the container, memory offline easily fails.
> Other devices may have other concerns. So the following udev rule you
> write does not work correctly.
>

IMHO, if the memory hot-remove(offline/ejection) has problem, then we
should report the issue and fix it in mm subsystem. Michal Hocko works
hard on this. I think that the CPU or IO subsystem are the same.

Current kernel can not complete the container hot-remove job without
userspace's involvement. So I sent the udev rule as a example to
response change uevents.

> I think we need to change offline processing for each device. So currently
> the userspace is responsible for the whole container offlining.
>

It depends on what is the expectation of the deivce offline function
in kernel. If a subsystem supports offline in kernel, then it should
not affects the running user space application. Otherwise the issue 
should be fixed.

Thanks a lot!
Joey Lee

      reply	other threads:[~2017-06-29  3:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26  6:26 A udev rule to serve the change event of ACPI container? joeyli
2017-06-26  8:59 ` Michal Hocko
2017-07-11  8:25   ` Michal Hocko
2017-07-13  6:58     ` joeyli
2017-07-13  7:06       ` Michal Hocko
2017-07-13 12:45         ` joeyli
2017-07-14  8:37           ` Michal Hocko
2017-07-14 14:44             ` joeyli
2017-07-17  9:05               ` Michal Hocko
2017-07-19  9:09                 ` joeyli
2017-07-24  8:57                   ` Michal Hocko
2017-07-24  9:29                     ` joeyli
2017-07-25 12:48                       ` Michal Hocko
2017-07-31  7:38                         ` joeyli
2017-08-02  9:01                           ` Michal Hocko
2017-08-03  9:22                             ` joeyli
2017-08-03  9:31                               ` Michal Hocko
2017-08-03  9:52                                 ` joeyli
2017-08-03 11:25                                   ` Michal Hocko
2017-07-23  9:18               ` joeyli
2017-08-01 19:21                 ` YASUAKI ISHIMATSU
2017-08-02  5:49                   ` joeyli
2017-08-03 15:37                     ` YASUAKI ISHIMATSU
2017-08-04 15:06                       ` Michal Hocko
2017-08-15 10:04                         ` joeyli
2017-06-28 19:53 ` YASUAKI ISHIMATSU
2017-06-29  3:57   ` joeyli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170629035736.GT4229@linux-l9pv.suse \
    --to=jlee@suse.com \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=rafael.j.wysocki@intel.com \
    --cc=yasu.isimatu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.