Re: kldunload DIAGNOSTIC idea...
From: Scott Long (scottl_at_samsco.org)
Date: 07/20/04
- Previous message: Scott Long: "Re: kldunload DIAGNOSTIC idea..."
- In reply to: Brian Fundakowski Feldman: "Re: kldunload DIAGNOSTIC idea..."
- Next in thread: Doug Rabson: "Re: kldunload DIAGNOSTIC idea..."
- Reply: Doug Rabson: "Re: kldunload DIAGNOSTIC idea..."
- Reply: Doug Rabson: "Re: kldunload DIAGNOSTIC idea..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 20 Jul 2004 13:10:29 -0600 To: Brian Fundakowski Feldman <green@freebsd.org>
Brian Fundakowski Feldman wrote:
> On Tue, Jul 20, 2004 at 08:39:57PM +0200, Poul-Henning Kamp wrote:
>
>>In message <20040720183213.GC1009@green.homeunix.org>, Brian Fundakowski Feldma
>>n writes:
>>
>>>On Tue, Jul 20, 2004 at 08:20:23PM +0200, Poul-Henning Kamp wrote:
>>>
>>>>I'm pulling hair out trying to make it guaranteed safe to unload device
>>>>driver modules, and the major pain here is to make sure there is no
>>>>thread stuck somewhere inside the code.
>>>>
>>>>That gave me the idea for a simple little DIAGNOSTIC check for kldunload:
>>>>run through the proc/thread table and look for any thread with an
>>>>instruction counter inside the range of pages we are going to unload.
>>>>
>>>>Any takers ?
>>>
>>>You mean any thread with a stack trace that includes an instruction
>>>counter inside those pages, don't you?
>>
>>That would require us to unwind the stack which I think is overkill
>>for the purpose.
>>
>>The most likely case is that the thread is sleeping on something
>>inside the kld so just checking the instruction pointer would be
>>fine.
>>
>>Looking for sleep addresses inside the module might make sense too.
>
>
> It's probably not overkill -- at least in my experience most of the
> time a driver is "doing something" it is sleeping, so the address
> will be in mi_switch() or somewhere way out there. Sleep addresses
> on dynamic data addresses are also a lot more common than sleep
> addresses on static/code addresses. If someone is interested in
> doign this, it would be very informative, especially if it could
> catch sleeps, pending timeouts, pending callouts, etc.
>
busdma callbacks, cam callbacks, netisr callbacks, and on and on and on.
Scott
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Scott Long: "Re: kldunload DIAGNOSTIC idea..."
- In reply to: Brian Fundakowski Feldman: "Re: kldunload DIAGNOSTIC idea..."
- Next in thread: Doug Rabson: "Re: kldunload DIAGNOSTIC idea..."
- Reply: Doug Rabson: "Re: kldunload DIAGNOSTIC idea..."
- Reply: Doug Rabson: "Re: kldunload DIAGNOSTIC idea..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: kldunload DIAGNOSTIC idea...
... >> on dynamic data addresses are also a lot more common than sleep ...
>> catch sleeps, pending timeouts, pending callouts, etc. ... > busdma callbacks,
cam callbacks, netisr callbacks, and on and on and ... (freebsd-arch) - Re: kldunload DIAGNOSTIC idea...
... >> on dynamic data addresses are also a lot more common than sleep ...
>> catch sleeps, pending timeouts, pending callouts, etc. ... > busdma callbacks,
cam callbacks, netisr callbacks, and on and on and ... (freebsd-arch) - Re: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 6)
... Am Mittwoch, 2. ... April 2008 17:13:11 schrieb Alan Stern: ...
suspended if they were suspended before the system went to sleep. ... the purpose
of the resume method is to let drivers know that ... (Linux-Kernel) - Re: how to run a command-line program from Perl/Tk (ExecuteCommand?)
... adapt the 'queued solution' example in the link above for my purpose, ...
You can create a thread and let it sleep until it is needed. ... (comp.lang.perl.tk) - Re: Two pounds a day
... I am able to sleep. ... My Creator has blessed me with the fortitude
that is needed for His ... purpose for me. ... Andrew B. Chung, MD/PhD ...
(sci.med)