[lkml]   [2019]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH RT] nvdimm: make lane acquirement RT aware
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_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 number is greater than the lane
> number, lane can be shared among CPUs. "ndl_lock->lock" is used to
> protect the lane in this situation.
> This patch is derived from Dan Williams and Pankaj Gupta's proposal from
> and
> Many thanks to them.
> Cc: Dan Williams <>
> Cc: Pankaj Gupta <>
> Cc: linux-rt-users <>
> Cc: linux-nvdimm <>
> Signed-off-by: Yongxin Liu <>

Looks ok to me in concept.

Acked-by: Dan Williams <>

 \ /
  Last update: 2019-03-06 17:35    [W:0.097 / U:3.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site