Re: [RFC/PATCH 0/22] W1: sysfs, lifetime and other fixes

From: Evgeniy Polyakov (johnpol_at_2ka.mipt.ru)
Date: 04/26/05

  • Next message: Evgeniy Polyakov: "Re: [RFC/PATCH 0/22] W1: sysfs, lifetime and other fixes"
    To: Greg KH <gregkh@suse.de>
    Date:	Tue, 26 Apr 2005 11:17:06 +0400
    
    
    

    On Tue, 2005-04-26 at 00:00 -0700, Greg KH wrote:
    > On Tue, Apr 26, 2005 at 10:43:36AM +0400, Evgeniy Polyakov wrote:
    > > On Mon, 2005-04-25 at 15:22 -0500, Dmitry Torokhov wrote:
    > > > On 4/25/05, Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
    > > > > While thinking about locking schema
    > > > > with respect to sysfs files I recalled,
    > > > > why I implemented such a logic -
    > > > > now one can _always_ remove _any_ module
    > > > > [corresponding object is removed from accessible
    > > > > pathes and waits untill all exsting users are gone],
    > > > > which is very good - I really like it in networking model,
    > > > > while with whole device driver model
    > > > > if we will read device's file very quickly
    > > > > in several threads we may end up not unloading it at all.
    > > >
    > > > I am sorrry, that is complete bull*. sysfs also allows removing
    > > > modules at an arbitrary time (and usually without annoying "waiting
    > > > for refcount" at that)... You just seem to not understand how driver
    > > > code works, thus the need of inventing your own schema.
    > >
    > > Ok, let's try again - now with explanation,
    > > since it looks like you did not even try to understand what I said.
    > > If you will remove objects from ->remove() callback
    > > you may end up with rmmod being stuck.
    >
    > Yes, and that is acceptable. networking implemented their own locking
    > method to allow unloading of their drivers in such a manner. No other
    > subsystem is going to do that kind of implementation, so Dmitry is
    > correct here.

    w1 does it too :)
    It's locking was lurked in network code.
    And it _is_ design note to be able to remove objects in any time.
    Ok, I can not say, that it is exactly like networking,
    since there is waiting in rmmod path, it is very similar to virtual
    devices
    like vlan.

    > thanks,
    >
    > greg k-h

    -- 
            Evgeniy Polyakov
    Crash is better than data corruption -- Arthur Grabowski
    
    

    -
    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/



  • Next message: Evgeniy Polyakov: "Re: [RFC/PATCH 0/22] W1: sysfs, lifetime and other fixes"

    Relevant Pages

    • Re: module-init-tools - input devices id support
      ... This is the first time I've looked at the input code, ... at least so I was assured by Greg. ... But it's designed for the hotplug stuff. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: --- (or anyone else) one small i2c question.
      ... Greg one small i2c question. ... one Milidegrees is one thousand Grade Celsius. ... The actual Reading, from the vt8231 inside the io space is an 8 bit value. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: file2alias - incorrect? aliases for USB
      ... Andrey: the reason everything is in there is I didn't know what Greg ... visor.c defines one empty slot in USB ids table that can be filled in at ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [lm-sensors] [PATCH 2.6.12-rc4 15/15] drivers/i2c/chips/adm1026.c: use dynamic sysfs callbacks
      ... I like the idea of aggregating the related sensor attributes into ... arrays, I did things the same way in bmcsensors but of course that was ... As Greg points out there is probably a nicer way to create the ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.9-rc1-mm5, ehci stuff gone
      ... On Monday 13 September 2004 23:56, Greg KH wrote: ... > ohci issues that I had in my laptop, and will show up in the next ... Copyright 2004 by Maurice Eugene Heskett, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)