lkml.org 
[lkml]   [2005]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 2.6.11-rc2-mm1
    On Wed, 26 Jan 2005 11:31:07 +0300, Evgeniy Polyakov
    <johnpol@2ka.mipt.ru> wrote:
    > On Tue, 2005-01-25 at 22:42 +0000, Christoph Hellwig wrote:
    > > > Yes, and it is better than removing module whose structures are in use.
    > > > SuperIO core is asynchronous in it's nature, one can use logical device
    > > > through superio core and remove it's module on other CPU, above loop
    > > > will
    > > > wait untill all reference counters are dropped.
    > >
    > > General rule is: increment module reference count while the hardware
    > > is actually in use, and let device structures be allocated by the
    > > bus core so drivers can be freed with them still allocated. That's
    > > how the driver model and thus about every other subsystem works.
    >
    > It is not general rule - network stack does not have such mechanism,
    > which is
    > very good, I doubt each block device module increment it's module
    > reference
    > when it catch a request...
    > It is internal structure that has reference counter, not module itself,
    > and this
    > structure may be in use, when module is unloaded, thus unloading must
    > wait,
    > untill all it's structures are freed.
    >

    No, it does not necessarily has to wait. You can unload driver at any
    time if you care to mark all its devices as "dead" and you have
    generic release function in a separate module that does not get
    unloaded until last registered device has been destroyed. Look for
    example at serio code. I think USB is about the same.

    --
    Dmitry
    -
    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: 2005-03-22 14:09    [W:3.619 / U:0.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site