Re: [PATCH] powerpc: Avoid taking a data miss on every userspace instruction miss

2017-04-13 Thread Michael Ellerman
Christophe LEROY writes: > Hi Anton, > > Le 04/04/2017 à 00:00, Anton Blanchard a écrit : >> Hi Christophe, >> - if (user_mode(regs)) + if (!is_exec && user_mode(regs)) >>> >>> Shouldn't it also check 'is_write' ? >>> If it is a store, is_write should be set,

Re: [PATCH] powerpc: Avoid taking a data miss on every userspace instruction miss

2017-04-12 Thread Christophe LEROY
Hi Anton, Le 04/04/2017 à 00:00, Anton Blanchard a écrit : Hi Christophe, - if (user_mode(regs)) + if (!is_exec && user_mode(regs)) Shouldn't it also check 'is_write' ? If it is a store, is_write should be set, shouldn't it ? Thanks, Ben had the same suggestion. I'll add that

Re: [PATCH] powerpc: Avoid taking a data miss on every userspace instruction miss

2017-04-03 Thread Anton Blanchard
Hi Christophe, > > - if (user_mode(regs)) > > + if (!is_exec && user_mode(regs)) > > Shouldn't it also check 'is_write' ? > If it is a store, is_write should be set, shouldn't it ? Thanks, Ben had the same suggestion. I'll add that further optimisation in a subsequent patch. Anton

Re: [PATCH] powerpc: Avoid taking a data miss on every userspace instruction miss

2017-04-03 Thread LEROY Christophe
Anton Blanchard a écrit : From: Anton Blanchard Early on in do_page_fault() we call store_updates_sp(), regardless of the type of exception. For an instruction miss this doesn't make sense, because we only use this information to detect if a data miss is

[PATCH] powerpc: Avoid taking a data miss on every userspace instruction miss

2017-04-03 Thread Anton Blanchard
From: Anton Blanchard Early on in do_page_fault() we call store_updates_sp(), regardless of the type of exception. For an instruction miss this doesn't make sense, because we only use this information to detect if a data miss is the result of a stack expansion instruction or

[PATCH] powerpc: Avoid taking a data miss on every userspace instruction miss

2017-03-30 Thread Anton Blanchard
From: Anton Blanchard Early on in do_page_fault() we call store_updates_sp(), regardless of the type of exception. For an instruction miss this doesn't make sense, because we only use this information to detect if a data miss is the result of a stack expansion instruction or