Subject: Re: how to avoid re-ordering?
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: tech-kern
Date: 12/18/2001 11:11:39
On Mon, Dec 17, 2001 at 03:42:54AM +0900, YAMAMOTO Takashi wrote:
> From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
? > I noticed that spl*/splx are inlined and re-orderd
> > with "-O3 -march=pentium", and it produce bad codes as a result.
> > I actually experienced panics due to this.
> 
> I'll commit attached patch some days later if no objection.
> thanks.

As you may have seen, I have committed the patch, with the change
suggested by Richard. Sorry to do it before you could, it seemed
to at least fix one problem for me, so I wanted it in ;-) Bill
Sommerfeld also committed it to the i386 mp branch. It fixed
the memory corruption problem I was seeing (at least, it certainly
looks like it).

Anyway, thanks! This one may actually explain several PRs, which
all mention 'softdep_write_complete: lock is held' panics. They
all seem to come from bio interrupts at a time when lkt_held
is not yet reset back to -1.

- Frank