Re: x86, perf: throttling issues with long nmi latencies

From: Peter Zijlstra
Date: Tue Oct 15 2013 - 10:39:46 EST


On Tue, Oct 15, 2013 at 10:36:31AM -0400, Don Zickus wrote:
> > > +refill:
> > > + if (kernel_ip(ip)) {
> > > + u8 *buf = &__get_cpu_var(insn_page[0]);
> > > + size = PAGE_SIZE - ((unsigned long)to & (PAGE_SIZE-1));
> > > + if (size < MAX_INSN_SIZE) {
> > > + /*
> > > + * If we're going to have to touch two pages; just copy
> > > + * as much as we can hold.
> > > + */
> > > + size = PAGE_SIZE;

> Quick thoughts?

Yeah, see the patch I just send; but notably I got the kernel_ip(ip)
case the wrong way about. See how it copies userspace memory for kernel
IPs and vice versa.


--
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/