Re: Suspend 2 merge: 22/51: Suspend2 lowlevel code.

Pavel Machek
2004-11-27T01:36:00Z

Hi!

> > > + * Note that the context and timing of this function is pretty critical.
> > > + * With a minimal amount of things going on in the caller and in here, gcc
> > > + * does a good job of being just a dumb compiler. Watch the assembly output
> > > + * if anything changes, though, and make sure everything is going in the right
> > > + * place.
> >
> > You should include assembly source (unless you can test all the compilers...). Feel free
> > to include C version, too, but #ifdef it out.
>
> I'm thinking I should actually be removing the comment. The C is simple,
> clear, fast and easy to maintain and we haven't actually had any
> problems at all with compilers. All my tweaking in here has turned out
> to be irrelevant to the real cause of problems (I recently found a bug
> where work queues were wrongly inheriting freezer flags; since fixing
> that, all the symptoms in this area have gone away).

See the flames I got when I did just that. No, it needs to be in
assembly, because (by standard) C compiler is allowed to misoptimize
it.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!