RE: [PATCH RT] nvdimm: make lane acquirement RT aware

2019-03-10 Thread Liu, Yongxin
er.kernel.org; > t...@linutronix.de; rost...@goodmis.org; dan.j.willi...@intel.com; > pagu...@redhat.com; Gortmaker, Paul; linux-nvd...@lists.01.org > Subject: Re: [PATCH RT] nvdimm: make lane acquirement RT aware > > On 2019-03-08 00:07:41 [+], Liu, Yongxin wrote: > > The lane

Re: [PATCH RT] nvdimm: make lane acquirement RT aware

2019-03-08 Thread Sebastian Andrzej Siewior
On 2019-03-08 00:07:41 [+], Liu, Yongxin wrote: > The lane is critical resource which needs to be protected. One CPU can use > only one > lane. If CPU number is greater than the number of total lane, the lane can be > shared > among CPUs. > > In non-RT kernel, get_cpu() disable preemption b

Re: [PATCH RT] nvdimm: make lane acquirement RT aware

2019-03-07 Thread Pankaj Gupta
> Currently, nvdimm driver isn't RT compatible. > nd_region_acquire_lane() disables preemption with get_cpu() which > causes "scheduling while atomic" spews on RT, when using fio to test > pmem as block device. > > In this change, we replace get_cpu/put_cpu with local_lock_cpu/ > local_unlock_cp

RE: [PATCH RT] nvdimm: make lane acquirement RT aware

2019-03-07 Thread Liu, Yongxin
er.kernel.org; > t...@linutronix.de; rost...@goodmis.org; dan.j.willi...@intel.com; > pagu...@redhat.com; Gortmaker, Paul; linux-nvd...@lists.01.org > Subject: Re: [PATCH RT] nvdimm: make lane acquirement RT aware > > On 2019-03-06 17:57:09 [+0800], Yongxin Liu wrote: > > In this

Re: [PATCH RT] nvdimm: make lane acquirement RT aware

2019-03-07 Thread Sebastian Andrzej Siewior
On 2019-03-06 17:57:09 [+0800], Yongxin Liu wrote: > In this change, we replace get_cpu/put_cpu with local_lock_cpu/ > local_unlock_cpu, and introduce per CPU variable "ndl_local_lock". > Due to preemption on RT, this lock can avoid race condition for the > same lane on the same CPU. When CPU numbe

Re: [PATCH RT] nvdimm: make lane acquirement RT aware

2019-03-06 Thread Dan Williams
On Wed, Mar 6, 2019 at 2:05 AM Yongxin Liu wrote: > > Currently, nvdimm driver isn't RT compatible. > nd_region_acquire_lane() disables preemption with get_cpu() which > causes "scheduling while atomic" spews on RT, when using fio to test > pmem as block device. > > In this change, we replace get_