lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 6 Mar 2019 08:35:21 -0800 From: Dan Williams <dan.j.williams@...el.com> To: Yongxin Liu <yongxin.liu@...driver.com> Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, linux-rt-users@...r.kernel.org, Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Thomas Gleixner <tglx@...utronix.de>, Steven Rostedt <rostedt@...dmis.org>, Pankaj Gupta <pagupta@...hat.com>, Paul Gortmaker <paul.gortmaker@...driver.com>, linux-nvdimm <linux-nvdimm@...ts.01.org> Subject: Re: [PATCH RT] nvdimm: make lane acquirement RT aware On Wed, Mar 6, 2019 at 2:05 AM Yongxin Liu <yongxin.liu@...driver.com> 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 > https://www.mail-archive.com/linux-nvdimm@lists.01.org/msg13359.html > and https://www.spinics.net/lists/linux-rt-users/msg20280.html. > Many thanks to them. > > Cc: Dan Williams <dan.j.williams@...el.com> > Cc: Pankaj Gupta <pagupta@...hat.com> > Cc: linux-rt-users <linux-rt-users@...r.kernel.org> > Cc: linux-nvdimm <linux-nvdimm@...ts.01.org> > Signed-off-by: Yongxin Liu <yongxin.liu@...driver.com> Looks ok to me in concept. Acked-by: Dan Williams <dan.j.williams@...el.com>
Powered by blists - more mailing lists