Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 2003 17:44:29 -0600
From:      Warner Losh <imp@harmony.village.org>
To:        Archie Cobbs <archie@dellroad.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: lots of malloc(M_WAITOK)'s in interrupt context from camisr 
Message-ID:  <200304292344.h3TNiTA7093598@harmony.village.org>
In-Reply-To: Your message of "Tue, 29 Apr 2003 15:54:19 PDT." <200304292254.h3TMsJ7F072778@arch20m.dellroad.org> 
References:  <200304292254.h3TMsJ7F072778@arch20m.dellroad.org>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200304292254.h3TMsJ7F072778@arch20m.dellroad.org> Archie Cobbs writes:
: >           Sleeping in an interrupt thread would destroy interrupt latency
: > far worse than it is now.  I'm sure we can all agree that that would be
: > unacceptable.
: 
: I'm only advocating doing it for rare events like device
: insertion/removal, etc.

You shouldn't be doing attach/detach from an interrupt context, but
rather from a thread context.  Right now there's no locking, so it
works, but when locking goes in you might not be able do so.  Depends
on the choice of lock I have: faster spin locks wouldn't work, but
slower mutexes would.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304292344.h3TNiTA7093598>