On 11/16/2016 11:46 AM, Stephane Grosjean wrote: > After a few complaint about 100% CPU usage of canfdtest over our PCI > -like boards, I have had a look to the source file, and think I have > found the issue in: > > diff --git a/canfdtest.c b/canfdtest.c > index 2407027..d7ba740 100644 > --- a/canfdtest.c > +++ b/canfdtest.c > @@ -239,7 +239,7 @@ static int can_echo_dut(void) > } > gettimeofday(&tvn, NULL); > while ((tv_stop.tv_sec > tvn.tv_sec) || > - ((tv_stop.tv_sec = tvn.tv_sec) && > + ((tv_stop.tv_sec == tvn.tv_sec) && > (tv_stop.tv_usec >= tvn.tv_usec))) > gettimeofday(&tvn, NULL); > } > > Am I right? Yes. But it still does a busywait. I've reviewed Ramesh's changes, that will fix the busywait. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |