The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [ATM] second pass at fixing atm spinlock
@ 2003-03-27 22:28 chas williams
  2003-03-28 10:07 ` Duncan Sands
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: chas williams @ 2003-03-27 22:28 UTC (permalink / raw)
  To: linux-atm-general, linux-kernel

ok, here is a further attempt at fixing the smp problems in the linux-atm
stack.  things have been moved around in net/atm:

. atm sk's are reference counted.  this makes the vcc_release (renamed
  from atm_release_vcc for consistency) and svc_release easier to write
  since you dont need to explicity free the sk
. vcc's are stored as a list of sockets, like other protocols
. atm drivers should use vcc_hold/vcc_put to modify reference counts.  the
  driver should read_lock(vcc_sklist_lock) before doing a vcc_hold() if
  they are in their 'bottom half'.  i converted eni, idt77252 (untested --
  no hardware), fore200e (untest -- lazy) and nicstar.  i also included the
  he driver.  the eni driver is special, since the bottom half is a tasklet
  you can simply stop the bottom half and be sure the bottom half
  isnt holding a reference.  the he just grabs the vcc_sklist_lock and 
  processes all the vcc's needing serviced.  a vcc cant disappear while 
  the lock is held (since the vcc_release needs to do a write_lock to unhash
  the socket/vcc before dropping the refcnt to 0).
. the nodev list has been removed and bind_vcc/unlink have been changed to
  just insert/remove vcc list operations.  this makes things a bit clearer.
. driver's check_ci() routine have been removed in favor of the one in
  atm_misc.c.  very few were actually any faster, and this functionality is
  rarely used.
. there is a new function, vcc_lookup(), used mostly by the fore200e and he
  driver.  vcc's returned by this function will need a vcc_put() or the
  ref count will be wrong.  in the future, most drivers should probably 
  use this function to find the vcc for their newly arrived data.  there
  possibly could be a routine atmif_rx(atmdev, skb, vpi, vci) which 
  just does the right thing.  ideally, atm would use netif_rx() but one
  would need to dummy up a ethernet header on each of the pdu's.  comments
  on that idea?
. all the stuff from the previous version: atmdev ref counting, atm and 
  clip can now build as modules.

ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/2_5_64_atm_dev_lock.patch

[i will try to get a 2.5.65 version available this weekend]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-04-15 18:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-27 22:28 [ATM] second pass at fixing atm spinlock chas williams
2003-03-28 10:07 ` Duncan Sands
2003-03-28 13:08   ` chas williams
2003-04-01 16:28 ` chas williams
2003-04-02  0:45   ` [Linux-ATM-General] " Till Immanuel Patzschke
2003-04-02  4:00     ` chas williams
2003-04-02  7:18   ` Christoph Hellwig
2003-04-02 12:11     ` chas williams
2003-04-03 18:46 ` [ATM] a few more changes for people to test chas williams
2003-04-15 18:58   ` [ATM] more changes available for testing chas williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox