<div dir="ltr"><div>On Mon, Apr 28, 2014 at 11:44 AM, GatoLoko <span dir="ltr"><<a href="mailto:gatoloko@gmail.com" target="_blank">gatoloko@gmail.com</a>></span> wrote:<br></div><div class="gmail_extra"><div class="gmail_quote">


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">It's been a while (almost two years) and there have been a lot of changes in flashrom, so I've tested this again and the same problem persists.<br>



<br>
Here are new logs from flashrom and strace.</blockquote><div><br></div>It's not too surprising... Flashrom does not trust OS timers and uses its <a href="http://tracker.coreboot.org/trac/flashrom/browser/trunk/udelay.c#L33" target="_blank">own delay mechanism</a> (a busy loop). It can be argued whether or not it should, but this approach is deemed more acceptable in the general case. This also has the side-effect of pegging a CPU at 100%.<div>

<br></div><div>More specifically, the timeout periods in the chips and host controllers which flashrom is often used on tends to be very tight, and usleep() or nanosleep() only guarantee will wait for a minimum amount of time but make no guarantees about a maximum amount of time. Obviously it's very bad if flashrom goes to sleep for too long and a transaction is aborted because it took the OS a bit too long to wake flashrom up.</div>

</div><br clear="all"><div><br></div>-- <br>David Hendricks (dhendrix)<br>
Systems Software Engineer, Google Inc.
</div></div>