Messages in this thread | | | Date | Wed, 14 Jan 2015 15:13:56 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH 6/8] locking/mcs: Better differentiate between mcs variants |
| |
* Davidlohr Bueso <dave@stgolabs.net> wrote:
> We have two flavors of the MCS spinlock: standard and cancelable (osq). > While each one is independent of the other, we currently mix and match > them. This patch: > > o Moves osq code out of mcs_spinlock.h (which only deals with the traditional > version) into include/linux/osq_lock.h. No unnecessary code is added to the > more global header file, anything locks that make use of osq must include > it anyway. > > o Renames mcs_spinlock.c to osq_lock.c. This file only contains osq code. > > o Introduces a CONFIG_LOCK_SPIN_ON_OWNER in order to only build osq_lock > if there is support for it. > > Signed-off-by: Davidlohr Bueso <dbueso@suse.de> > --- > include/linux/osq_lock.h | 12 ++- > kernel/Kconfig.locks | 4 + > kernel/locking/Makefile | 3 +- > kernel/locking/mcs_spinlock.c | 208 ------------------------------------------ > kernel/locking/mcs_spinlock.h | 16 ---- > kernel/locking/osq_lock.c | 203 +++++++++++++++++++++++++++++++++++++++++ > 6 files changed, 219 insertions(+), 227 deletions(-) > delete mode 100644 kernel/locking/mcs_spinlock.c > create mode 100644 kernel/locking/osq_lock.c
x86 defconfig produces:
kernel/locking/mcs_spinlock.h:81:2: error: implicit declaration of function ‘ASSIGN_ONCE’ [-Werror=implicit-function-declaration]
Also, this patch should really be split into three separate (and tested) patches.
Thanks,
Ingo
| |