From: Mitchell Blank Jr <mitch@sfgoth.com>
To: chas williams <chas@locutus.cmf.nrl.navy.mil>
Cc: linux-atm-general@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [ATM] first pass at fixing atm spinlock
Date: Wed, 19 Mar 2003 02:57:34 -0800 [thread overview]
Message-ID: <20030319025734.C35024@sfgoth.com> (raw)
In-Reply-To: <200303172325.h2HNPpGi015350@locutus.cmf.nrl.navy.mil>; from chas@locutus.cmf.nrl.navy.mil on Mon, Mar 17, 2003 at 06:25:50PM -0500
chas williams wrote:
> fairly certain. the only dangerous thing proc.c is snprintf(). i didnt
> want to spend a lot of time on proc.c doing it the 'right' way (using
> atm_dev_hold/release) since it will be change to a seq interface.
Great!
> >sock/vcc combo can't go away while a processor's bh still is using a reference
> >to the vcc. I think this has been the result of many of the reported SMP
> >crashes (it's probably not that hard to trigger; just close an ATM socket
> >that's receiving a flood of traffic)
>
> i dont know. i believe all of the adapters do a synchronous close.
I'm really not sure it's that safe. At the very least the drivers all
need to make sure that their ->close() excludes their interrupt/bh work
from happening. That would probably be possible but it seems that it
would be better to just build a robust refcount system at the lower layer.
This should make it quite a bit easier to ensure that the drivers are safe.
Also remember that some drivers have a common area that incoming PDUs
get put in (especially for AAL0 traffic) so there might be stuff in there
even after a close.
So I think you're right that it's possible to get by without vcc refcounting
I think the best method would be to implement an atm_vcc_{find,hold,release}
that uses the sock's refcount so we can cleanly and 100% safely take a
reference to a vcc from a bh.
> >You really need something like atm_dev_release_last() that waits for the
> >reference count to hit "1" (via a completion or something) and then does
> >the release stuff.
>
> atm_dev_deregister() does that. if a driver need to remove the atm
> device (i suppose its being unplugged) it could close the vcc's and
> call atm_dev_register() which will wait the ref count to drop to 0.
Great - now we just have to do the same thing for vcc's :-)
-Mitch
next prev parent reply other threads:[~2003-03-19 10:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OFAFD4106C.6053931B-ON85256CE0.004F1DD6@gdeb.com>
2003-03-17 22:24 ` [ATM] first pass at fixing atm spinlock chas williams
2003-03-17 23:01 ` Mitchell Blank Jr
2003-03-17 23:25 ` chas williams
2003-03-18 1:13 ` Till Immanuel Patzschke
2003-03-18 16:11 ` chas williams
2003-03-19 10:57 ` Mitchell Blank Jr [this message]
2003-03-19 15:13 ` chas williams
2003-03-19 17:11 ` [Linux-ATM-General] " Duncan Sands
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030319025734.C35024@sfgoth.com \
--to=mitch@sfgoth.com \
--cc=chas@locutus.cmf.nrl.navy.mil \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.