From: Toshi Kani <toshi.kani@hp.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
LKML <linux-kernel@vger.kernel.org>,
Yinghai Lu <yinghai@kernel.org>, Jiang Liu <liuj97@gmail.com>
Subject: Re: [PATCH 2/7] ACPI / scan: Introduce common code for ACPI-based device hotplug
Date: Wed, 20 Feb 2013 13:23:34 -0700 [thread overview]
Message-ID: <1361391814.9542.72.camel@misato.fc.hp.com> (raw)
In-Reply-To: <2868646.oscSukR6ks@vostro.rjw.lan>
On Wed, 2013-02-20 at 14:23 +0100, Rafael J. Wysocki wrote:
> On Tuesday, February 19, 2013 03:43:08 PM Yasuaki Ishimatsu wrote:
:
> >
> > > - status = acpi_os_hotplug_execute(acpi_bus_hot_remove_device, ej_event);
> > > - if (ACPI_FAILURE(status)) {
> > > - put_device(&acpi_device->dev);
> > > - kfree(ej_event);
> > > + acpi_evaluate_hotplug_ost(acpi_device->handle, ost_source,
> > > + ACPI_OST_SC_EJECT_IN_PROGRESS, NULL);
> > > + get_device(&acpi_device->dev);
> > > + ret = acpi_scan_hot_remove(acpi_device);
> >
> > Why don't you use acpi_os_hotplug_execute()? Do you have some reason?
>
> Yes, I do. acpi_eject_store() is run in a separate thread anyway (started by
> user space), so there's no need to use the workqueue for delayed execution here
> and we are under acpi_scan_lock anyway, so there shouldn't be any concurrency
> issues.
Well, there is an issue... I just tested your patchset and hit the
following hang when I tried to delete a container through its sysfs
eject. This thread got stuck in trying to delete the sysfs eject file
of the container. I believe this is because the shell is still opening
this sysfs eject file.
PID: 1518 TASK: ffff88005f09c950 CPU: 1 COMMAND: "bash"
#0 [ffff88003392baf8] __schedule at ffffffff8151ba75
#1 [ffff88003392bb70] schedule at ffffffff8151bdc7
#2 [ffff88003392bb80] schedule_timeout at ffffffff8151aa55
#3 [ffff88003392bc00] wait_for_common at ffffffff8151bc43
#4 [ffff88003392bc70] wait_for_completion at ffffffff8151bd60
#5 [ffff88003392bc80] sysfs_addrm_finish at ffffffff811984ad
#6 [ffff88003392bcd0] sysfs_hash_and_remove at ffffffff81196deb
#7 [ffff88003392bd10] sysfs_remove_file at ffffffff81197051
#8 [ffff88003392bd40] device_remove_file at ffffffff81332950
#9 [ffff88003392bd50] acpi_device_unregister at ffffffff812a0556
#10 [ffff88003392bd80] acpi_bus_remove at ffffffff812a0658
#11 [ffff88003392bda0] acpi_bus_trim at ffffffff812a090e
#12 [ffff88003392bdd0] acpi_scan_hot_remove at ffffffff812a09c9
#13 [ffff88003392be30] acpi_eject_store at ffffffff812a0b45
#14 [ffff88003392be70] dev_attr_store at ffffffff81332038
#15 [ffff88003392be80] sysfs_write_file at ffffffff81197212
#16 [ffff88003392bee0] vfs_write at ffffffff8113a3cb
#17 [ffff88003392bf20] sys_write at ffffffff8113a5fd
#18 [ffff88003392bf80] system_call_fastpath at ffffffff81523759
RIP: 00000033a16e4950 RSP: 00007fff4a5f5368 RFLAGS: 00000206
RAX: 0000000000000001 RBX: ffffffff81523759 RCX: ffffffffffffffff
RDX: 0000000000000002 RSI: 00007f2f8a3d8000 RDI: 0000000000000001
RBP: 00007f2f8a3d8000 R8: 000000000000000a R9: 00007f2f8a3c4740
R10: 00007f2f8a3c4740 R11: 0000000000000246 R12: 00000033a19b1260
R13: 0000000000000002 R14: ffff880000000000 R15: ffff88003395d680
ORIG_RAX: 0000000000000001 CS: 0033 SS: 002b
Thanks,
-Toshi
next prev parent reply other threads:[~2013-02-20 20:34 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-17 15:18 [PATCH 0/7] ACPI / hotplug: Common code for ACPI-based hotplug Rafael J. Wysocki
2013-02-17 15:20 ` [PATCH 1/7] ACPI / scan: Introduce acpi_scan_match_handler() Rafael J. Wysocki
2013-02-19 6:48 ` Yasuaki Ishimatsu
2013-02-17 15:21 ` [PATCH 2/7] ACPI / scan: Introduce common code for ACPI-based device hotplug Rafael J. Wysocki
2013-02-19 6:43 ` Yasuaki Ishimatsu
2013-02-19 7:10 ` Yasuaki Ishimatsu
2013-02-20 13:27 ` Rafael J. Wysocki
2013-02-20 13:23 ` Rafael J. Wysocki
2013-02-20 20:23 ` Toshi Kani [this message]
2013-02-20 21:17 ` Rafael J. Wysocki
2013-02-20 22:49 ` [Update][PATCH " Rafael J. Wysocki
2013-02-21 1:17 ` Toshi Kani
2013-02-21 15:44 ` Rafael J. Wysocki
2013-02-21 15:52 ` [Update 2][PATCH " Rafael J. Wysocki
2013-02-21 17:39 ` Toshi Kani
2013-02-21 22:57 ` Rafael J. Wysocki
2013-02-21 23:06 ` [Update 3][PATCH " Rafael J. Wysocki
2013-02-22 1:12 ` Toshi Kani
2013-02-22 1:50 ` Rafael J. Wysocki
2013-02-22 8:51 ` Yasuaki Ishimatsu
2013-02-22 12:37 ` Rafael J. Wysocki
2013-02-22 15:54 ` Toshi Kani
2013-02-22 20:59 ` Rafael J. Wysocki
2013-02-23 22:38 ` [Update 4][PATCH " Rafael J. Wysocki
2013-02-25 18:07 ` Toshi Kani
2013-02-25 23:39 ` Rafael J. Wysocki
2013-02-25 23:32 ` Toshi Kani
2013-02-26 0:40 ` Yasuaki Ishimatsu
2013-02-26 1:09 ` Toshi Kani
2013-02-26 2:02 ` Yasuaki Ishimatsu
2013-02-26 3:11 ` Rafael J. Wysocki
2013-02-26 3:40 ` Yasuaki Ishimatsu
2013-02-26 3:50 ` Rafael J. Wysocki
2013-03-04 13:10 ` Vasilis Liaskovitis
2013-03-14 17:16 ` Rafael J. Wysocki
2013-03-15 10:47 ` Vasilis Liaskovitis
2013-03-25 20:45 ` Toshi Kani
2013-03-25 22:29 ` Rafael J. Wysocki
2013-03-25 22:57 ` Toshi Kani
2013-03-26 12:22 ` Rafael J. Wysocki
2013-03-26 20:10 ` Toshi Kani
2013-02-17 15:22 ` [PATCH 3/7] ACPI / container: Use common hotplug code Rafael J. Wysocki
2013-02-17 15:23 ` [PATCH 4/7] ACPI / scan: Introduce acpi_scan_handler_matching() Rafael J. Wysocki
2013-02-19 8:05 ` Yasuaki Ishimatsu
2013-02-17 15:24 ` [PATCH 5/7] ACPI / hotplug: Introduce user space interface for hotplug profiles Rafael J. Wysocki
2013-02-25 18:13 ` Toshi Kani
2013-02-25 23:25 ` Rafael J. Wysocki
2013-02-17 15:25 ` [PATCH 6/7] ACPI / container: Use hotplug profile user space interface Rafael J. Wysocki
2013-02-17 15:27 ` [PATCH 7/7] ACPI / scan: Make memory hotplug driver use struct acpi_scan_handler Rafael J. Wysocki
2013-02-19 18:11 ` Vasilis Liaskovitis
2013-02-20 3:35 ` Yasuaki Ishimatsu
2013-02-20 10:42 ` Vasilis Liaskovitis
2013-02-20 21:50 ` Toshi Kani
2013-02-20 22:29 ` Rafael J. Wysocki
2013-02-20 22:39 ` Toshi Kani
2013-02-21 6:58 ` Yasuaki Ishimatsu
2013-02-26 22:41 ` [PATCH v2, 0/7] ACPI / hotplug: Common code for ACPI-based hotplug Rafael J. Wysocki
2013-02-26 22:44 ` [PATCH v2, 1/7] ACPI / scan: Introduce acpi_scan_match_handler() Rafael J. Wysocki
2013-02-26 22:46 ` [PATCH v2, 2/7] ACPI / scan: Introduce common code for ACPI-based device hotplug Rafael J. Wysocki
2013-02-26 22:46 ` [PATCH v2, 3/7] ACPI / container: Use common hotplug code Rafael J. Wysocki
2013-02-26 23:13 ` Toshi Kani
2013-02-27 0:06 ` Rafael J. Wysocki
2013-02-27 0:09 ` [Update][PATCH " Rafael J. Wysocki
2013-02-26 22:47 ` [PATCH v2, 4/7] ACPI / scan: Introduce acpi_scan_handler_matching() Rafael J. Wysocki
2013-02-26 22:48 ` [PATCH v2, 5/7] ACPI / hotplug: Introduce user space interface for hotplug profiles Rafael J. Wysocki
2013-02-26 22:49 ` [PATCH v2, 6/7] ACPI / container: Use hotplug profile user space interface Rafael J. Wysocki
2013-02-26 22:50 ` [PATCH v2, 7/7] ACPI / scan: Make memory hotplug driver use struct acpi_scan_handler Rafael J. Wysocki
2013-02-27 0:51 ` [PATCH v2, 0/7] ACPI / hotplug: Common code for ACPI-based hotplug Toshi Kani
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=1361391814.9542.72.camel@misato.fc.hp.com \
--to=toshi.kani@hp.com \
--cc=bhelgaas@google.com \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=rjw@sisk.pl \
--cc=yinghai@kernel.org \
/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