[lkml]   [2003]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[ATM] first pass at fixing atm spinlock

this should apply cleanly to the stock 2-5-64 sources. its an attempt
to make the atm spinlock a little less obnoxious. atm_dev_lock is now a
read/write lock that now protects the list of atm devices. an individual
spinlock protect the various members of atm_dev, like the vcc list and
addr lists. atm_dev's are refcounted, so there is no longer any need
to hold a lock across the ioctl. atm_find_dev is gone, in favor of
atm_dev_lookup, atm_dev_release, and atm_dev_hold. atm_dev_lookup()
and atm_dev_hold() increment the ref count. atm_dev_release() drops
the ref count.

this patch also makes atm and clip modular. the clip arp 'interface' in
ipv4/arp.c isn't very pretty. it seems to me that there should be a
better way. anyway, instead of clip_tbl, its now clip_tbl_hook which
is exported for the clip module to set as it desires (the atm proc interface
also uses this instead of exporting clip_tbl via atm_clip_ops)

things are not set in stone yet, so i would like some advice -- the per
device vcc list will probably be traversed (read-only) in the bottom
half of the kernel during receive for some adapters. is it simply
enough to use list_for_each_safe() when traversing the list? otherwise
the per device spinlock will need to shared between the top and bottom half
of the kernel. the vcc's shouldnt need to be ref counted since they
are rather tightly coupled to a struct sock which is. i dont like
the 'shutdown on last reference' in atm_dev_release(). you can only
safely call release when you know you can sleep. is shutdown_atm_dev()
really that useful?

i would like a few brave souls test and comment on this code. i could
possibly provide a 2.4.20 patch in a couple days.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:34    [W:0.058 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site