Displaying 20 results from an estimated 56 matches for "lockref".
Did you mean:
lockres
2016 Oct 25
0
[GIT PULL v2 4/5] processor.h: Remove cpu_relax_lowlatency users
...vhost/net.c | 4 ++--
kernel/locking/mcs_spinlock.h | 4 ++--
kernel/locking/mutex.c | 4 ++--
kernel/locking/osq_lock.c | 6 +++---
kernel/locking/qrwlock.c | 6 +++---
kernel/locking/rwsem-xadd.c | 4 ++--
lib/lockref.c | 2 +-
8 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
index 8832f8e..383d134 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_requ...
2014 Mar 12
2
[PATCH v6 04/11] qspinlock: Optimized code path for 2 contending tasks
...; + /*
> + * Set the lock bit& clear the waiting bit simultaneously
> + * It is assumed that there is no lock stealing with this
> + * quick path active.
> + *
> + * A direct memory store of _QSPINLOCK_LOCKED into the
> + * lock_wait field causes problem with the lockref code, e.g.
> + * ACCESS_ONCE(qlock->lock_wait) = _QSPINLOCK_LOCKED;
> + *
> + * It is not currently clear why this happens. A workaround
> + * is to use atomic instruction to store the new value.
> + */
> + {
> + u16 lw = xchg(&qlock->lock_wait, _QSPINL...
2014 Mar 12
2
[PATCH v6 04/11] qspinlock: Optimized code path for 2 contending tasks
...; + /*
> + * Set the lock bit& clear the waiting bit simultaneously
> + * It is assumed that there is no lock stealing with this
> + * quick path active.
> + *
> + * A direct memory store of _QSPINLOCK_LOCKED into the
> + * lock_wait field causes problem with the lockref code, e.g.
> + * ACCESS_ONCE(qlock->lock_wait) = _QSPINLOCK_LOCKED;
> + *
> + * It is not currently clear why this happens. A workaround
> + * is to use atomic instruction to store the new value.
> + */
> + {
> + u16 lw = xchg(&qlock->lock_wait, _QSPINL...
2014 Mar 13
0
[PATCH v6 04/11] qspinlock: Optimized code path for 2 contending tasks
...et the lock bit& clear the waiting bit simultaneously
> >+ * It is assumed that there is no lock stealing with this
> >+ * quick path active.
> >+ *
> >+ * A direct memory store of _QSPINLOCK_LOCKED into the
> >+ * lock_wait field causes problem with the lockref code, e.g.
> >+ * ACCESS_ONCE(qlock->lock_wait) = _QSPINLOCK_LOCKED;
> >+ *
> >+ * It is not currently clear why this happens. A workaround
> >+ * is to use atomic instruction to store the new value.
> >+ */
> >+ {
> >+ u16 lw = xchg(&...
2014 Jun 15
0
[PATCH 01/11] qspinlock: A simple generic 4-byte queue spinlock
...return atomic_read(&lock->val);
+}
+
+/**
+ * queue_spin_value_unlocked - is the spinlock structure unlocked?
+ * @lock: queue spinlock structure
+ * Return: 1 if it is unlocked, 0 otherwise
+ *
+ * N.B. Whenever there are tasks waiting for the lock, it is considered
+ * locked wrt the lockref code to avoid lock stealing by the lockref
+ * code and change things underneath the lock. This also allows some
+ * optimizations to be applied without conflict with lockref.
+ */
+static __always_inline int queue_spin_value_unlocked(struct qspinlock lock)
+{
+ return !atomic_read(&l...
2015 Feb 04
1
[PATCH v3 18/18] vhost: vhost_scsi_handle_vq() should just use copy_from_user()
...*addr, size_t bytes, __wsum *csum, struct iov_iter *i);
-int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov,
- int offset, int len);
#endif
diff --git a/lib/Makefile b/lib/Makefile
index 3c3b30b..1071d06 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -24,7 +24,7 @@ obj-y += lockref.o
obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
- gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o clz_ctz.o \
+ gcd.o lcm.o list_sort.o uuid.o flex_array.o clz_ctz.o \
bsearch.o find_last_bi...
2015 Feb 04
1
[PATCH v3 18/18] vhost: vhost_scsi_handle_vq() should just use copy_from_user()
...*addr, size_t bytes, __wsum *csum, struct iov_iter *i);
-int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov,
- int offset, int len);
#endif
diff --git a/lib/Makefile b/lib/Makefile
index 3c3b30b..1071d06 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -24,7 +24,7 @@ obj-y += lockref.o
obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
- gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o clz_ctz.o \
+ gcd.o lcm.o list_sort.o uuid.o flex_array.o clz_ctz.o \
bsearch.o find_last_bi...
2015 Mar 16
0
[PATCH 1/9] qspinlock: A simple generic 4-byte queue spinlock
...return atomic_read(&lock->val);
+}
+
+/**
+ * queue_spin_value_unlocked - is the spinlock structure unlocked?
+ * @lock: queue spinlock structure
+ * Return: 1 if it is unlocked, 0 otherwise
+ *
+ * N.B. Whenever there are tasks waiting for the lock, it is considered
+ * locked wrt the lockref code to avoid lock stealing by the lockref
+ * code and change things underneath the lock. This also allows some
+ * optimizations to be applied without conflict with lockref.
+ */
+static __always_inline int queue_spin_value_unlocked(struct qspinlock lock)
+{
+ return !atomic_read(&l...
2016 Nov 25
5
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On 11/25/2016 05:17 PM, Peter Zijlstra wrote:
> On Fri, Nov 25, 2016 at 04:10:04PM +0000, Mark Rutland wrote:
>> On Fri, Nov 25, 2016 at 04:21:39PM +0100, Dmitry Vyukov wrote:
>
>>> What are use cases for such primitive that won't be OK with "read once
>>> _and_ atomically"?
>>
>> I have none to hand.
>
> Whatever triggers the
2016 Nov 25
5
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On 11/25/2016 05:17 PM, Peter Zijlstra wrote:
> On Fri, Nov 25, 2016 at 04:10:04PM +0000, Mark Rutland wrote:
>> On Fri, Nov 25, 2016 at 04:21:39PM +0100, Dmitry Vyukov wrote:
>
>>> What are use cases for such primitive that won't be OK with "read once
>>> _and_ atomically"?
>>
>> I have none to hand.
>
> Whatever triggers the
2016 Oct 25
7
[GIT PULL v2 0/5] cpu_relax: drop lowlatency, introduce yield
.../locking/mcs_spinlock.h | 4 ++--
kernel/locking/mutex.c | 4 ++--
kernel/locking/osq_lock.c | 6 +++---
kernel/locking/qrwlock.c | 6 +++---
kernel/locking/rwsem-xadd.c | 4 ++--
kernel/stop_machine.c | 2 +-
lib/lockref.c | 2 +-
42 files changed, 53 insertions(+), 53 deletions(-)
2016 Oct 25
7
[GIT PULL v2 0/5] cpu_relax: drop lowlatency, introduce yield
.../locking/mcs_spinlock.h | 4 ++--
kernel/locking/mutex.c | 4 ++--
kernel/locking/osq_lock.c | 6 +++---
kernel/locking/qrwlock.c | 6 +++---
kernel/locking/rwsem-xadd.c | 4 ++--
kernel/stop_machine.c | 2 +-
lib/lockref.c | 2 +-
42 files changed, 53 insertions(+), 53 deletions(-)
2016 Nov 25
0
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
...h these PTE accesses being done
> > NOT atomic.
>
> That strikes me as surprising. Is there some mutual exclusion that
> prevents writes from occuring wherever a READ_ONCE() happens to a PTE?
>
> Otherwise, how is tearing not a problem? Does it have some pattern like
> the lockref cmpxchg?
On x86 PAE we play silly games, see arch/x86/mm/gup.c:gup_get_ptr().
Those two loads really should be READ_ONCE()/LOAD_SINGLE().
2016 Nov 25
0
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
...the mm/ code is perfectly fine with these PTE accesses being done
> NOT atomic.
That strikes me as surprising. Is there some mutual exclusion that
prevents writes from occuring wherever a READ_ONCE() happens to a PTE?
Otherwise, how is tearing not a problem? Does it have some pattern like
the lockref cmpxchg?
Thanks,
Mark.
2015 Nov 03
0
[PATCH 1/3] dma: Provide simple noop dma ops
...file
+++ b/lib/Makefile
@@ -18,6 +18,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
lib-$(CONFIG_MMU) += ioremap.o
lib-$(CONFIG_SMP) += cpumask.o
+lib-$(CONFIG_HAS_DMA) += dma-noop.o
lib-y += kobject.o klist.o
obj-y += lockref.o
diff --git a/lib/dma-noop.c b/lib/dma-noop.c
new file mode 100644
index 0000000..7214564
--- /dev/null
+++ b/lib/dma-noop.c
@@ -0,0 +1,75 @@
+/*
+ * lib/dma-noop.c
+ *
+ * Simple DMA noop-ops that map 1:1 with memory
+ */
+#include <linux/export.h>
+#include <linux/mm.h>
+#include <...
2015 Nov 05
0
[GIT PULL v4 1/3] dma: Provide simple noop dma ops
...file
+++ b/lib/Makefile
@@ -18,6 +18,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
lib-$(CONFIG_MMU) += ioremap.o
lib-$(CONFIG_SMP) += cpumask.o
+lib-$(CONFIG_HAS_DMA) += dma-noop.o
lib-y += kobject.o klist.o
obj-y += lockref.o
diff --git a/lib/dma-noop.c b/lib/dma-noop.c
new file mode 100644
index 0000000..7214564
--- /dev/null
+++ b/lib/dma-noop.c
@@ -0,0 +1,75 @@
+/*
+ * lib/dma-noop.c
+ *
+ * Simple DMA noop-ops that map 1:1 with memory
+ */
+#include <linux/export.h>
+#include <linux/mm.h>
+#include <...
2016 Nov 25
3
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On Fri, Nov 25, 2016 at 04:21:39PM +0100, Dmitry Vyukov wrote:
>
> READ/WRITE_ONCE imply atomicity. Even if their names don't spell it (a
> function name doesn't have to spell all of its guarantees). Most of
> the uses of READ/WRITE_ONCE will be broken if they are not atomic.
In practice, this is certainly the assumption made by many/most users of
the *_ONCE() accessors.
2014 Mar 12
0
[PATCH v6 04/11] qspinlock: Optimized code path for 2 contending tasks
...)
+ arch_mutex_cpu_relax();
+
+ /*
+ * Set the lock bit & clear the waiting bit simultaneously
+ * It is assumed that there is no lock stealing with this
+ * quick path active.
+ *
+ * A direct memory store of _QSPINLOCK_LOCKED into the
+ * lock_wait field causes problem with the lockref code, e.g.
+ * ACCESS_ONCE(qlock->lock_wait) = _QSPINLOCK_LOCKED;
+ *
+ * It is not currently clear why this happens. A workaround
+ * is to use atomic instruction to store the new value.
+ */
+ {
+ u16 lw = xchg(&qlock->lock_wait, _QSPINLOCK_LOCKED);
+ BUG_ON(lw != _QSPI...
2014 May 16
2
[LLVMdev] [llvmlinux] [LLVMLinux] Regression: rev 208833/208834 break linux kernel build in ASM handling
...ile 31 "/src/linux/include/linux" "dcache.h"
> .file 32 "/src/linux/include/linux" "seqlock.h"
> .file 33 "/src/linux/include/linux" "list_bl.h"
> .file 34 "/src/linux/include/linux" "lockref.h"
> .file 35 "/src/linux/include/linux" "path.h"
> .file 36 "/src/linux/include/linux" "module.h"
> .file 37 "/src/linux/include/linux" "kobject.h"
> .file 38 "/src/linux/inclu...
2014 May 16
2
[LLVMdev] [LLVMLinux] Regression: rev 208833/208834 break linux kernel build in ASM handling
Hi !
I reproduced it on the file init/main.c
The invocation, log and main.i / main.s is attached.
--
Dipl.-Ing.
Jan-Simon Möller
jansimon.moeller at gmx.de
Am Freitag, 16. Mai 2014, 14:25:47 schrieb Renato Golin:
> On 16 May 2014 14:01, Jan-Simon Möller <dl9pf at gmx.de> wrote:
> > A bisection points to
> >
> > git-svn-id: