Re: arc_usr_cmpxchg and preemption

2018-03-15 Thread Alexey Brodkin
Hi Peter, On Thu, 2018-03-15 at 12:28 +0100, Peter Zijlstra wrote: > On Thu, Mar 15, 2018 at 09:12:09AM +, Alexey Brodkin wrote: > > On Thu, 2018-03-15 at 09:18 +0100, Peter Zijlstra wrote: > > > Also, it might make sense to stuff this implementation in some lib/ file > > > somewhere and make

Re: mmc: block: bonnie++ runs with errors on arc/hsdk board

2018-03-15 Thread Alexey Brodkin
Hi Vineet, On Thu, 2018-03-15 at 09:38 -0700, Vineet Gupta wrote: > On 03/15/2018 02:27 AM, Adrian Hunter wrote: > > Please try: > > > > perf record -a -e mmc:* -- bonnie++ -u root -r 256 -s 512 -x 1 -d /mnt > > > > and share the resulting perf.data file when you are able > > to reproduce th

Re: [PATCH] mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs

2018-03-15 Thread Evgeniy Didin
On Thu, 2018-03-15 at 14:39 +0100, Ulf Hansson wrote: > On 15 March 2018 at 14:18, Evgeniy Didin wrote: > > Hello Ulf, > > > > On Thu, 2018-03-15 at 10:57 +0100, Ulf Hansson wrote: > > > On 14 March 2018 at 20:30, Evgeniy Didin > > > wrote: > > > > It was found that in IDMAC mode after soft-res

Re: Do we need to disable preemption in flush_tlb_range()?

2018-03-15 Thread Vineet Gupta
+CC some more folks for intc/irq insights - please see question at the bottom ! On 03/15/2018 02:39 AM, Alexey Brodkin wrote: Hi Peter, On Thu, 2018-03-15 at 09:27 +0100, Peter Zijlstra wrote: On Wed, Mar 14, 2018 at 01:19:01PM -0700, Vineet Gupta wrote: +CC Peter since we have his attention

Re: mmc: block: bonnie++ runs with errors on arc/hsdk board

2018-03-15 Thread Vineet Gupta
On 03/15/2018 02:27 AM, Adrian Hunter wrote: Please try: perf record -a -e mmc:* -- bonnie++ -u root -r 256 -s 512 -x 1 -d /mnt and share the resulting perf.data file when you are able to reproduce the hung task message. You may want to add this patch first: https://marc.info/

Re: [PATCH] mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs

2018-03-15 Thread Ulf Hansson
On 15 March 2018 at 14:18, Evgeniy Didin wrote: > Hello Ulf, > > On Thu, 2018-03-15 at 10:57 +0100, Ulf Hansson wrote: >> On 14 March 2018 at 20:30, Evgeniy Didin wrote: >> > It was found that in IDMAC mode after soft-reset driver switches >> > to PIO mode. >> > >> > That's what happens in case o

Re: [PATCH] mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs

2018-03-15 Thread Evgeniy Didin
Hello Ulf, On Thu, 2018-03-15 at 10:57 +0100, Ulf Hansson wrote: > On 14 March 2018 at 20:30, Evgeniy Didin wrote: > > It was found that in IDMAC mode after soft-reset driver switches > > to PIO mode. > > > > That's what happens in case of DTO timeout overflow calculation failure: > > 1. soft-re

Re: arc_usr_cmpxchg and preemption

2018-03-15 Thread Peter Zijlstra
On Thu, Mar 15, 2018 at 09:12:09AM +, Alexey Brodkin wrote: > On Thu, 2018-03-15 at 09:18 +0100, Peter Zijlstra wrote: > > Also, it might make sense to stuff this implementation in some lib/ file > > somewhere and make all platforms that need it use the same code, afaict > > there really isn't

Re: [PATCH] mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs

2018-03-15 Thread Ulf Hansson
On 14 March 2018 at 20:30, Evgeniy Didin wrote: > It was found that in IDMAC mode after soft-reset driver switches > to PIO mode. > > That's what happens in case of DTO timeout overflow calculation failure: > 1. soft-reset is called > 2. driver restarts dma > 3. descriptors states are checked, one

Re: Do we need to disable preemption in flush_tlb_range()?

2018-03-15 Thread Alexey Brodkin
Hi Peter, On Thu, 2018-03-15 at 09:27 +0100, Peter Zijlstra wrote: > On Wed, Mar 14, 2018 at 01:19:01PM -0700, Vineet Gupta wrote: > > +CC Peter since we have his attention ;-) > > Yeah, timezone collision there, I typically sleep at 1am ;-) > > > On 03/01/2018 07:13 AM, Alexey Brodkin wrote: >

Re: mmc: block: bonnie++ runs with errors on arc/hsdk board

2018-03-15 Thread Adrian Hunter
On 14/03/18 14:32, Evgeniy Didin wrote: > Hi Adrian, >>> >>> Was the performance affected? i.e. the results from bonnie++ >> >> I have run bonnie++ several times before and after mentioned commit. Here is >> output: >> --<8---

Re: arc_usr_cmpxchg and preemption

2018-03-15 Thread Alexey Brodkin
Hi Peter, On Thu, 2018-03-15 at 09:18 +0100, Peter Zijlstra wrote: > On Wed, Mar 14, 2018 at 08:38:53PM +, Alexey Brodkin wrote: > > > int sys_cmpxchg(u32 __user *user_ptr, u32 old, u32 new) > > > { > > > u32 val; > > > int ret; > > > > > > again: > > > ret = 0; > > > > > > preempt_d

Re: Do we need to disable preemption in flush_tlb_range()?

2018-03-15 Thread Peter Zijlstra
On Wed, Mar 14, 2018 at 01:19:01PM -0700, Vineet Gupta wrote: > +CC Peter since we have his attention ;-) Yeah, timezone collision there, I typically sleep at 1am ;-) > On 03/01/2018 07:13 AM, Alexey Brodkin wrote: > > Hi Vineet, > > > > Just noticed that in comments for smp_call_function_many()

Re: arc_usr_cmpxchg and preemption

2018-03-15 Thread Peter Zijlstra
On Wed, Mar 14, 2018 at 08:38:53PM +, Alexey Brodkin wrote: > > int sys_cmpxchg(u32 __user *user_ptr, u32 old, u32 new) > > { > > u32 val; > > int ret; > > > > again: > > ret = 0; > > > > preempt_disable(); > > val = get_user(user_ptr); > > if (val == old) > >