Linux ACPI
 help / color / mirror / Atom feed
From: YASUAKI ISHIMATSU <yasu.isimatu@gmail.com>
To: linux-acpi@vger.kernel.org
Cc: Michal Hocko <mhocko@kernel.org>, rafael.j.wysocki@intel.com
Subject: Cannot access force_remove sysfs
Date: Wed, 28 Jun 2017 14:16:57 -0400	[thread overview]
Message-ID: <4034c534-ea67-03ca-f1ee-bc55e0ce487d@gmail.com> (raw)

Our sever supports system board (defined as ACPI0004) hotplug. And to hot-remove the device safely,
we control force_remove sysfs. But due to the following commit, ACPI0004 hotplug does not work.

commit ffc10d82ff5df7087a9b737de55a69ac4f89bf56
Author: Michal Hocko <mhocko@suse.com>
Date:   Mon Apr 3 09:40:23 2017 +0200

    ACPI / scan: Drop support for force_remove

ACPI0004 is defined as module device in ACPI specification. So we don't know what devices mounts on ACPI0004.
So to hot-remove ACPI0004 safely, we implemented that ACPI004 can be hot removed only when acpi_force_hot_remove
is set to 1 via force_remove sysfs. And if acpi_force_hot_remove is set to 0, kernel just notifies REMOVE request
of ACPI0004 to udev so that user can offline the devices on ACPI0004 by udev rule.

In our udev script, we hot-removes ACPI0004 safely as follows:

  1. udev catches REMOVE request of a ACPI0004 and run our script
  2. Our script offline all devices on the ACPI0004
  3. Our script write 1 to force_remove sysfs so that ACPI0004 can be hot-removed.
  4. Our script write 1 to eject sysfs of the ACPI0004 to hot remove ACPI0004
  5. Our script write 0 to force_remove sysfs so that the ACPI0004 cannot be hot-removed.

But due to the commit ffc10d82ff5d, there is no way to hot remove ACPI0004.
So please revert the commit.

Thanks,
Yasuaki Ishimatsu

             reply	other threads:[~2017-06-28 18:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 18:16 YASUAKI ISHIMATSU [this message]
2017-06-28 20:41 ` Cannot access force_remove sysfs YASUAKI ISHIMATSU

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=4034c534-ea67-03ca-f1ee-bc55e0ce487d@gmail.com \
    --to=yasu.isimatu@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=rafael.j.wysocki@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox