Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/pci



Ooops, I accidently didn't cc the list:

----- Forwarded message from Martin Husemann <martin%duskware.de@localhost> -----

Date: Tue, 7 Apr 2015 22:30:23 +0200
From: Martin Husemann <martin%duskware.de@localhost>
To: Masanobu SAITOH <msaitoh%execsw.org@localhost>
Subject: Re: CVS commit: src/sys/dev/pci
In-Reply-To: <5523B0F9.6000503%execsw.org@localhost>
User-Agent: Mutt/1.4.2.3i

On Tue, Apr 07, 2015 at 07:27:05PM +0900, Masanobu SAITOH wrote:
> What does this change fix? To prevent panic on shutdown?

Yes: bge0 detaches (say on cpu0) while concurrently the callout triggers
(say on cpu1) and the internal data structures are freed concurrently to
the access (in bge_tick).

My notebook regulary crashed very late during shutdown, but I usually have
ddb.onpanic turned off, so I couldn't examine more closely.

The change makes sure all "ongoing" callouts have completed before the
detach frees internal stuff.

> Almost all drviers have the same code. Should we fix all of them
> like this?

I think so. Maybe the "halt" can be done unconditionally, but only if
callout_destroy() will be used imediately afterwards it is important
to do so.

ozaki-r and I have been chasing similar issues for a while and fixed
them whenever we could get hold of concrete lossage.

Martin


Home | Main Index | Thread Index | Old Index