lkml.org 
[lkml]   [2007]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject[PATCHSET 2/4] sysfs: allow suicide
Date
From
Hello, all.

This is the second patchset of four sysfs update patchset series[1]
and to be applied on top of the first patchset[1].

Currently, sysfs files which want to kill themselves should ask
someone else (workqueue) to kill it, which is so inhumane. This
patchset updates sysfs file implementation such that sysfs files can
commit suicide peacefully.

Global sledgehammer module unload inhibition/delay mechanism is
implemented and used to prevent premature unload while suicide is in
progress. Suicide attempt is detected by scanning sysfs_buffers for
matching accessor. If suicide is detected, active references the
accessor were holding are dropped early such that the suiciding node
can be deactivated without deadlock.

As active references go away early, the module basing the code the
accessor is running can go away before it finishes. Global module
unload inhibition is used here to prevent that until accessor callback
is complete.

This patchset contains the following four patches.

0001-module-implement-module_inhibit_unload.patch
0002-sysfs-make-the-sysfs_addrm_cxt-removed-list-FIFO.patch
0003-sysfs-care-free-suicide-for-sysfs-files.patch
0004-sysfs-make-suicidal-nodes-just-do-it-directly.patch

0001 needs Rusty Russell's ack.

Thanks.

--
tejun

[1] http://thread.gmane.org/gmane.linux.kernel/582105


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-09-20 09:29    [W:0.105 / U:1.716 seconds]
©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site