Re: [PATCH v3 2/2] x86, mwaitt: introduce mwaix delay with a configurable timer

From: Huang Rui
Date: Fri Jun 12 2015 - 04:02:35 EST


On Fri, Jun 12, 2015 at 09:38:48AM +0200, Peter Zijlstra wrote:
> On Fri, Jun 12, 2015 at 12:03:22PM +0800, Huang Rui wrote:
>
> > > What's the purpose of the "enable" parameter?
> > >
> >
> > Enable mwaitx timer. Should I add comments to explain the usage?
>
> No, you should read your own patch, notice that the only usage site
> provides a true, then realize its a redundant bit of code and kill it
> dead.

Yeah, but I remembered at last time, someone tell me we shouldn't
force to set timer always enabled. So I add this interface to expose
more clearly. :)

So could I use __mwaitx directly like below:

__monitorx(&dummy, 0, 0);
__mwaitx(0xf, delay, MWAITX_ECX_TIMER_ENABLE);


Thanks,
Rui
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/