On Wed, Jun 15, 2016 at 03:01:19PM -0400, Waiman Long wrote:
> On 06/15/2016 04:04 AM, Boqun Feng wrote:
> > Hi Waiman,
> >
> > On Tue, Jun 14, 2016 at 06:48:04PM -0400, Waiman Long wrote:
> > > The osq_lock() and osq_unlock() function may not provide the neces
Hi Waiman,
On Tue, Jun 14, 2016 at 06:48:04PM -0400, Waiman Long wrote:
> The osq_lock() and osq_unlock() function may not provide the necessary
> acquire and release barrier in some cases. This patch makes sure
> that the proper barriers are provided when osq_lock() is successful
> or when osq_un
On Mon, Jun 13, 2016 at 12:45:23PM -0700, Davidlohr Bueso wrote:
> On Fri, 03 Jun 2016, Pan Xinhui wrote:
>
> > The existing version uses a heavy barrier while only release semantics
> > is required. So use atomic_sub_return_release instead.
> >
> > Suggested-by: Peter Zijlstra (Intel)
> > Signe
t; spin_lock()
This patch therefore fixes the issue and also cleans the
arch_spin_unlock_wait() a little bit by removing superfluous memory
barriers in loops and consolidating the implementations for PPC32 and
PPC64 into one.
Suggested-by: "Paul E. McKenney"
Signed-off-by: Boqun F
On Fri, Jun 10, 2016 at 01:25:03AM +0800, Boqun Feng wrote:
> On Thu, Jun 09, 2016 at 10:23:28PM +1000, Michael Ellerman wrote:
> > On Wed, 2016-06-08 at 15:59 +0200, Peter Zijlstra wrote:
> > > On Wed, Jun 08, 2016 at 11:49:20PM +1000, Michael Ellerman wrote:
> > >
&
On Thu, Jun 09, 2016 at 10:23:28PM +1000, Michael Ellerman wrote:
> On Wed, 2016-06-08 at 15:59 +0200, Peter Zijlstra wrote:
> > On Wed, Jun 08, 2016 at 11:49:20PM +1000, Michael Ellerman wrote:
> >
> > > > Ok; what tree does this go in? I have this dependent series which I'd
> > > > like to get so
On Tue, Jun 07, 2016 at 02:00:16PM +0200, Peter Zijlstra wrote:
> On Tue, Jun 07, 2016 at 07:43:15PM +0800, Boqun Feng wrote:
> > On Mon, Jun 06, 2016 at 06:08:36PM +0200, Peter Zijlstra wrote:
> > > diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
> &
On Mon, Jun 06, 2016 at 06:08:36PM +0200, Peter Zijlstra wrote:
> On Thu, Jun 02, 2016 at 06:57:00PM +0100, Will Deacon wrote:
> > > This 'replaces' commit:
> > >
> > > 54cf809b9512 ("locking,qspinlock: Fix spin_is_locked() and
> > > spin_unlock_wait()")
> > >
> > > and seems to still work wit
On Mon, Jun 06, 2016 at 02:52:05PM +1000, Michael Ellerman wrote:
> On Fri, 2016-03-06 at 03:49:48 UTC, Boqun Feng wrote:
> > There is an ordering issue with spin_unlock_wait() on powerpc, because
> > the spin_lock primitive is an ACQUIRE and an ACQUIRE is only ordering
> >
_locked_sync()
-> spin_unlock() -> spin_lock()
This patch therefore fixes the issue and also cleans the
arch_spin_unlock_wait() a little bit by removing superfluous memory
barriers in loops and consolidating the implementations for PPC32 and
PPC64 into one.
Suggested-by
On Thu, Jun 02, 2016 at 11:11:07PM +0800, Boqun Feng wrote:
[snip]
>
> OK, I will resend a new patch making spin_unlock_wait() align the
> semantics in your series.
>
I realize that if my patch goes first then it's more safe and convenient
to keep the two smp_mb()s in ppc arch
On Thu, Jun 02, 2016 at 04:44:24PM +0200, Peter Zijlstra wrote:
> On Thu, Jun 02, 2016 at 10:24:40PM +0800, Boqun Feng wrote:
> > On Thu, Jun 02, 2016 at 01:52:02PM +0200, Peter Zijlstra wrote:
> > About spin_unlock_wait() on ppc, I actually have a fix pending review
On Thu, Jun 02, 2016 at 01:52:02PM +0200, Peter Zijlstra wrote:
[snip]
> --- a/arch/powerpc/include/asm/spinlock.h
> +++ b/arch/powerpc/include/asm/spinlock.h
> @@ -27,6 +27,8 @@
> #include
> #include
> #include
> +#include
> +#include
>
> #ifdef CONFIG_PPC64
> /* use 0x80yy when lo
On Wed, Jun 01, 2016 at 06:22:55PM +0200, Peter Zijlstra wrote:
> On Wed, Jun 01, 2016 at 09:52:14PM +0800, Boqun Feng wrote:
> > On Tue, May 31, 2016 at 11:41:37AM +0200, Peter Zijlstra wrote:
>
> > > @@ -292,7 +282,7 @@ static void sem_wait_array(struct sem_ar
>
On Tue, May 31, 2016 at 11:41:37AM +0200, Peter Zijlstra wrote:
[snip]
> @@ -260,16 +260,6 @@ static void sem_rcu_free(struct rcu_head
> }
>
> /*
> - * spin_unlock_wait() and !spin_is_locked() are not memory barriers, they
> - * are only control barriers.
> - * The code must pair with spin_unlo
On Wed, Jun 01, 2016 at 11:11:38AM +0800, Boqun Feng wrote:
> Hi Peter,
>
> On Tue, May 31, 2016 at 12:19:44PM +0200, Peter Zijlstra wrote:
> [snip]
> >
> > @@ -329,20 +361,53 @@ atomic64_##op##_return_relaxed(lo
Hi Peter,
On Tue, May 31, 2016 at 12:19:44PM +0200, Peter Zijlstra wrote:
[snip]
>
> @@ -329,20 +361,53 @@ atomic64_##op##_return_relaxed(long a, a
> return t; \
> }
>
> +#define ATOMIC64_FETCH_OP_RELAXED(op, asm_op)
Hi Waiman,
On Thu, May 26, 2016 at 02:21:57PM -0400, Waiman Long wrote:
> Currently, calling pv_hash() and setting _Q_SLOW_VAL is only
> done once for any pv_node. It is either in pv_kick_node() or in
> pv_wait_head_or_lock(). Because of lock stealing, a pv_kick'ed node is
> not guaranteed to get
On Mon, May 23, 2016 at 10:52:09AM -0700, Linus Torvalds wrote:
> On Mon, May 23, 2016 at 5:25 AM, Peter Zijlstra wrote:
> >
> > Paul has smp_mb__after_unlock_lock() for the RCpc 'upgrade'. How about
> > something like:
> >
> > smp_mb__after_lock()
>
> I'd much rather make the naming be h
On Tue, May 24, 2016 at 09:53:29PM -0700, Paul E. McKenney wrote:
> On Tue, May 24, 2016 at 11:01:21PM -0400, Waiman Long wrote:
> > On 05/24/2016 10:27 AM, Peter Zijlstra wrote:
> > >Introduce smp_acquire__after_ctrl_dep(), this construct is not
> > >uncommen, but the lack of this barrier is.
> >
tions by default.
Suggested-by: Paul E. McKenney
Signed-off-by: Boqun Feng
Fixes: http://lkml.kernel.org/r/57411b10.mfvg0+agcrmxgtcj%fengguang...@intel.com
---
kernel/rcu/rcuperf.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/r
On Tue, May 24, 2016 at 11:06:52AM -0700, Paul E. McKenney wrote:
> On Mon, May 23, 2016 at 12:35:35PM +0800, Boqun Feng wrote:
> > On Sun, May 22, 2016 at 08:28:06AM -0700, Paul E. McKenney wrote:
> > > On Sun, May 22, 2016 at 02:26:49PM +0800, Boqun Feng wrot
On Sun, May 22, 2016 at 08:28:06AM -0700, Paul E. McKenney wrote:
> On Sun, May 22, 2016 at 02:26:49PM +0800, Boqun Feng wrote:
> > Hi Paul,
> >
> > On Sat, May 21, 2016 at 10:24:22PM -0700, Paul E. McKenney wrote:
> > > On Sun, May 22, 2016 at 10:36:00AM
Hi Paul,
On Sat, May 21, 2016 at 10:24:22PM -0700, Paul E. McKenney wrote:
> On Sun, May 22, 2016 at 10:36:00AM +0800, kernel test robot wrote:
> > Greetings,
> >
> > 0day kernel testing robot got the below dmesg and the first bad commit is
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git
Hi Peter,
On Fri, May 20, 2016 at 01:58:19PM +0200, Peter Zijlstra wrote:
> On Thu, May 19, 2016 at 10:39:26PM -0700, Davidlohr Bueso wrote:
> > As such, the following restores the behavior of the ticket locks and 'fixes'
> > (or hides?) the bug in sems. Naturally incorrect approach:
> >
> > @@ -
The option "-soundhw pcspk" gives me a error on PPC as follow:
qemu-system-ppc64: ISA bus not available for pcspk
, which means this option doesn't work on ppc by default. So simply make
this an x86-specific option via identify_qemu_args().
Signed-off-by: Boqun Feng
---
Do not restrict the cpu type to POWER7 for QEMU as we have POWER8 now.
Signed-off-by: Boqun Feng
---
tools/testing/selftests/rcutorture/bin/functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh
b/tools/testing
${TORTURE_BOOT_IMAGE} is not set on non-x86 architectures, also fixes
several places that hard-code "bzImage" as $KERNEL.
This also fixes a problem that PPC doesn't have a bzImage file as build
results.
Signed-off-by: Boqun Feng
---
tools/testing/selftests/rcutorture/bin/functio
tions where host's initramfs couldn't be used.
Signed-off-by: Boqun Feng
---
tools/testing/selftests/rcutorture/doc/initrd.txt | 22 ++
1 file changed, 22 insertions(+)
diff --git a/tools/testing/selftests/rcutorture/doc/initrd.txt
b/tools/testing/selftests
x27;m certainly not an expert of qemu or bash programming, there
may be something I am missing in those patches. So tests and comments
are welcome ;-)
Regards,
Boqun
Boqun Feng (4):
rcutorture/doc: Add a new way to create initrd using dracut
rcutorture: Use vmlinux as the fallback kernel
If the whole system has only one cpu, that cpu won't be able to be
offlined, so there is no need onoff task is stil running.
Signed-off-by: Boqun Feng
---
I hit something like the following while I was running rcutorture
in a guest with only one vCPU:
[ 31.197457] rcu-torture:torture_
Hi Waiman,
On Thu, Apr 21, 2016 at 11:02:05AM -0400, Waiman Long wrote:
> Pan Xinhui was asking for a lock holder cpu argument in pv_wait()
> to help the porting of pvqspinlock to PPC. The new argument will can
> help hypervisor expediate the execution of the critical section by
> the lock holder,
On Wed, Apr 27, 2016 at 10:50:34PM +0800, Boqun Feng wrote:
>
> Sorry, my bad, we can't implement cmpxchg like this.. please ignore
> this, I should really go to bed soon...
>
> But still, we can save the "tmp" for xchg() I think.
>
No.. we can't. Sorr
On Wed, Apr 27, 2016 at 09:58:17PM +0800, Boqun Feng wrote:
> On Wed, Apr 27, 2016 at 05:16:45PM +0800, Pan Xinhui wrote:
> > From: Pan Xinhui
> >
> > Implement xchg{u8,u16}{local,relaxed}, and
> > cmpxchg{u8,u16}{,local,acquire,relaxed}.
> >
> > It works
On Wed, Apr 27, 2016 at 09:58:17PM +0800, Boqun Feng wrote:
> On Wed, Apr 27, 2016 at 05:16:45PM +0800, Pan Xinhui wrote:
> > From: Pan Xinhui
> >
> > Implement xchg{u8,u16}{local,relaxed}, and
> > cmpxchg{u8,u16}{,local,acquire,relaxed}.
> >
> > It works
On Wed, Apr 27, 2016 at 05:16:45PM +0800, Pan Xinhui wrote:
> From: Pan Xinhui
>
> Implement xchg{u8,u16}{local,relaxed}, and
> cmpxchg{u8,u16}{,local,acquire,relaxed}.
>
> It works on all ppc.
>
> remove volatile of first parameter in __cmpxchg_local and __cmpxchg
>
> Suggested-by: Peter Zijl
Commit-ID: c24697566298df04cac9913e0601501b5ee2b3f5
Gitweb: http://git.kernel.org/tip/c24697566298df04cac9913e0601501b5ee2b3f5
Author: Boqun Feng
AuthorDate: Tue, 16 Feb 2016 13:57:40 +0800
Committer: Ingo Molnar
CommitDate: Sat, 23 Apr 2016 13:53:03 +0200
locking/lockdep: Fix
On Fri, Apr 22, 2016 at 05:53:11PM +0100, Will Deacon wrote:
> On Sat, Apr 23, 2016 at 12:08:57AM +0800, Boqun Feng wrote:
> > On Tue, Apr 12, 2016 at 05:59:41PM +0100, Will Deacon wrote:
> > [...]
> > > > +static inline void __cmpwait(volatile void *ptr, unsigned
On Sat, Apr 23, 2016 at 04:37:36AM +0200, Peter Zijlstra wrote:
> On Sat, Apr 23, 2016 at 12:08:57AM +0800, Boqun Feng wrote:
> > How about replace smp_rmb() with a smp_acquire_barrier__after_cmpwait()?
> > This barrier is designed to provide an ACQUIRE ordering when combinin
On Fri, Apr 22, 2016 at 11:04:31AM +0200, Peter Zijlstra wrote:
> Implement FETCH-OP atomic primitives, these are very similar to the
> existing OP-RETURN primitives we already have, except they return the
> value of the atomic variable _before_ modification.
>
> This is especially useful for irre
On Tue, Apr 12, 2016 at 05:59:41PM +0100, Will Deacon wrote:
[...]
> > +static inline void __cmpwait(volatile void *ptr, unsigned long val, int
> > size)
> > +{
> > + switch (size) {
> > + case 1: return __cmpwait_case_1(ptr, val);
> > + case 2: return __cmpwait_case_2(ptr, val);
> > + cas
On Fri, Apr 22, 2016 at 09:59:22AM +0800, Pan Xinhui wrote:
> On 2016年04月21日 23:52, Boqun Feng wrote:
> > On Thu, Apr 21, 2016 at 11:35:07PM +0800, Pan Xinhui wrote:
> >> On 2016年04月20日 22:24, Peter Zijlstra wrote:
> >>> On Wed, Apr 20, 2016 at 09:2
On Thu, Apr 21, 2016 at 11:35:07PM +0800, Pan Xinhui wrote:
> On 2016年04月20日 22:24, Peter Zijlstra wrote:
> > On Wed, Apr 20, 2016 at 09:24:00PM +0800, Pan Xinhui wrote:
> >
> >> +#define __XCHG_GEN(cmp, type, sfx, skip, v)
> >> \
> >> +static __always_inline unsigne
barriers in loops and consolidating the implementations for PPC32 and
PPC64 into one.
Suggested-by: "Paul E. McKenney"
Signed-off-by: Boqun Feng
Reviewed-by: "Paul E. McKenney"
---
arch/powerpc/include/asm/spinlock.h | 48 -
arch/powerpc/l
barriers in loops and consolidating the implementations for PPC32 and
PPC64 into one.
Suggested-by: "Paul E. McKenney"
Signed-off-by: Boqun Feng
Reviewed-by: "Paul E. McKenney"
---
arch/powerpc/include/asm/spinlock.h | 48 -
arch/powerpc/l
Hi Xinhui,
On Tue, Apr 19, 2016 at 02:29:34PM +0800, Pan Xinhui wrote:
> From: Pan Xinhui
>
> Implement xchg{u8,u16}{local,relaxed}, and
> cmpxchg{u8,u16}{,local,acquire,relaxed}.
>
> It works on all ppc.
>
Nice work!
AFAICT, your work doesn't depend on anything that ppc-specific, right?
So
Hi Paul,
On Tue, Apr 12, 2016 at 08:18:21AM -0700, Paul E. McKenney wrote:
> This commit adds documentation for RCU's major data structures,
> including rcu_state, rcu_node, rcu_data, rcu_dynticks, and rcu_head.
>
One small thing, you are using term TREE_PREEMPT_RCU throughout the
whole document
On Wed, Apr 13, 2016 at 01:38:33PM -0400, Waiman Long wrote:
> On 04/12/2016 10:09 PM, Boqun Feng wrote:
> > Hi Waiman,
> >
> > On Tue, Apr 12, 2016 at 06:54:43PM -0400, Waiman Long wrote:
> > [...]
> > > +
> > > +/*
> > > + *
my code reading skills, I think the following patch
helps ;-) Also it can resolve several splats of sparse when running
'make C=1 lib/'.
Thoughts?
Regards,
Boqun
>8
From: Boqun Feng
Date: Wed, 13 Apr 2016 09:49:13 +0800
Subject: [PATCH]
On Thu, Mar 31, 2016 at 05:42:34PM +0200, Peter Zijlstra wrote:
> On Wed, Mar 30, 2016 at 05:59:54PM +0800, Boqun Feng wrote:
> > So we should use macro like current_hardirq_context() here? Or
> > considering the two helpers introduced in my RFC:
> >
> > http://lkml.ke
Hi Peter,
On Wed, Mar 30, 2016 at 11:36:59AM +0200, Peter Zijlstra wrote:
> On Tue, Mar 29, 2016 at 10:47:02AM +0200, Ingo Molnar wrote:
>
> > > You are right; this is lockdep running into a hash collision; which is a
> > > new
> > > DEBUG_LOCKDEP test. See 9e4e7554e755 ("locking/lockdep: Detec
On Sun, Mar 27, 2016 at 10:59:00PM +0200, Sedat Dilek wrote:
> On Sun, Mar 27, 2016 at 10:48 PM, Peter Zijlstra wrote:
> > On Sun, Mar 27, 2016 at 05:03:44AM -0700, Linus Torvalds wrote:
> >> Anyway, I don't think that DEBUG_LOCKS_WARN_ON() in
> >>
> >> kernel/locking/lockdep.c:2017 __lock_acqui
On Sun, Mar 27, 2016 at 05:03:44AM -0700, Linus Torvalds wrote:
> On Sun, Mar 27, 2016 at 1:57 AM, Sedat Dilek wrote:
> >
> > I pulled ext4.git#dev on top of Linux v4.6-rc1...
> >
> > ... and did not see the call-trace.
>
> Unless you're using overlayfs or per-file encryption, I'm not seeing
> th
On Wed, Mar 23, 2016 at 09:38:46AM -0700, Paul E. McKenney wrote:
> On Wed, Mar 23, 2016 at 11:11:48PM +0800, Boqun Feng wrote:
> > Currently, we have four versions of rcu_read_lock_sched_held(),
> > depending on the combined choices on PREEMPT_COUNT and DEBUG_LOCK_ALLOC.
> >
ng as expected and save several lines of code.
Signed-off-by: Boqun Feng
---
include/linux/rcupdate.h | 17 +
kernel/rcu/update.c | 4 ++--
2 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index b5d48bd..e3
On Sat, Mar 19, 2016 at 12:10:30PM +0800, Boqun Feng wrote:
> Hi Steven,
>
> On Fri, Mar 18, 2016 at 01:06:02PM -0400, Steven Rostedt wrote:
> > While testing the tracer preemptoff, I hit this strange trace:
> >
> > # cmd p
Hi Steven,
On Fri, Mar 18, 2016 at 01:06:02PM -0400, Steven Rostedt wrote:
> While testing the tracer preemptoff, I hit this strange trace:
>
> # cmd pid | time | caller
> # \ / | \| /
><...>-259 0...10us : schedule <-worker_thread
>
On Tue, Mar 01, 2016 at 11:01:34AM +0100, Peter Zijlstra wrote:
> On Tue, Mar 01, 2016 at 10:57:07AM +0100, Peter Zijlstra wrote:
> > On Tue, Mar 01, 2016 at 05:32:42PM +0800, Boqun Feng wrote:
> > > > One could for example allow something like:
> > > &g
On Mon, Feb 29, 2016 at 01:43:18PM +0100, Peter Zijlstra wrote:
> On Mon, Feb 29, 2016 at 09:12:20AM +0800, Boqun Feng wrote:
>
> > The problem is:
> >
> > Currently there is no way to know which rcu_dereference() and its
> > friends a rcu_read_lock() or one of
On Fri, Feb 26, 2016 at 12:25:21PM +0100, Peter Zijlstra wrote:
> On Fri, Feb 26, 2016 at 11:06:27AM +0800, Boqun Feng wrote:
> > On Thu, Feb 25, 2016 at 07:37:24AM -0800, Paul E. McKenney wrote:
> > > On Thu, Feb 25, 2016 at 03:32:43PM +0100, Peter Zijlstra wrote:
> > >
On Thu, Feb 25, 2016 at 07:37:24AM -0800, Paul E. McKenney wrote:
> On Thu, Feb 25, 2016 at 03:32:43PM +0100, Peter Zijlstra wrote:
> > On Tue, Feb 16, 2016 at 01:57:39PM +0800, Boqun Feng wrote:
> > > As a characteristic of RCU, read-side critical sections have a very
> >
Hi Waiman,
On Tue, Feb 23, 2016 at 02:04:30PM -0500, Waiman Long wrote:
> Linked list is used everywhere in the Linux kernel. However, if many
> threads are trying to add or delete entries into the same linked list,
> it can create a performance bottleneck.
>
> This patch introduces a new per-cpu
+ BUILD_BUG();
Maybe we can use BUILD_BUG_ON_MSG(1, "Unsupported size for xchg"), which
could provide more information.
With or without this verbosity:
Acked-by: Boqun Feng
Regards,
Boqun
> return x;
> }
>
> @@ -124,7 +119,7 @@ __xchg_local(volatile void *ptr
LOCKED_ACCESS.
Signed-off-by: Boqun Feng
---
include/linux/lockdep.h | 29
kernel/locking/lockdep.c | 121 +++
2 files changed, 150 insertions(+)
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 2ffe6c3..cf7b6c8 100644
Provide the proc filesystem interface for LOCKED_ACCESS, for a locked
access class whose name is , there will be a file at
/proc/locked_access/ containing all the information the
LOCKED_ACCESS has collected so far.
Also add a macro to define a locked access class.
Signed-off-by: Boqun Feng
option RCU_LOCKED_ACCESS.
Also clean up the initialization code of lockdep_maps for different
flavors of RCU a little bit.
Signed-off-by: Boqun Feng
---
include/linux/rcupdate.h | 12
include/linux/srcu.h | 2 +-
kernel/locking/lockdep.c | 3 +++
kernel/rcu/update.c | 25
Hi all,
This is the v2 for RCU_LOCKED_ACCESS.
Link of v1: http://article.gmane.org/gmane.linux.kernel/2143674
Changes since v1:
* Define newly introduced irq_context helpers as macros when
lockdep doesn't trace irq_context, because these helpers will be
quite simple then a
Add held_lock::prev_acqchain_key and task_struct::curr_acqchain_key to
maintain the keys of acqchains as the same as what lockdep does for
keys of lock classes.
Signed-off-by: Boqun Feng
---
include/linux/lockdep.h | 3 +++
include/linux/sched.h| 3 +++
kernel/fork.c| 3
a lock is
acquired, so it needs another way than getting the value from
held_lock::irq_context
Signed-off-by: Boqun Feng
---
kernel/locking/lockdep.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
ind
ons.
This patch defines the structures for those concepts, along with the
manipulation operations. Besides, config option CONFIG_LOCKED_ACCESS
is introduced in this patch, too.
Signed-off-by: Boqun Feng
---
include/linux/lockdep.h| 17
kernel/locking/lockdep.c
On Mon, Feb 15, 2016 at 08:08:40PM -0800, Paul E. McKenney wrote:
> On Tue, Feb 16, 2016 at 11:01:43AM +0800, Boqun Feng wrote:
> > On Mon, Feb 15, 2016 at 05:05:53PM -0800, Paul E. McKenney wrote:
> > > On Thu, Feb 04, 2016 at 12:45:12AM +0800, Boqun Feng wrote:
> > > &
On Mon, Feb 15, 2016 at 05:05:53PM -0800, Paul E. McKenney wrote:
> On Thu, Feb 04, 2016 at 12:45:12AM +0800, Boqun Feng wrote:
> > The variables protected by an RCU read-side critical section are
> > sometimes hard to figure out, especially when the critical section is
>
As a characteristic of RCU, read-side critical sections have a very
loose connection with rcu_dereference()s, which is you can only be sure
about an rcu_dereference() might be called in some read-side critical
section, but if code gets complex, you may not be sure which read-side
critical section e
option RCU_LOCKED_ACCESS.
Also clean up the initialization code of lockdep_maps for different
flavors of RCU a little bit.
Signed-off-by: Boqun Feng
---
include/linux/rcupdate.h | 8
include/linux/srcu.h | 8 +++-
kernel/locking/lockdep.c | 3 +++
kernel/rcu/update.c
Add held_lock::prev_acqchain_key and task_struct::curr_acqchain_key to
maintain the keys of acqchains as the same as what lockdep does for
keys of lock classes.
Signed-off-by: Boqun Feng
---
include/linux/lockdep.h | 3 +++
include/linux/sched.h| 3 +++
kernel/fork.c| 3
a lock is
acquired, so it needs another way than getting the value from
held_lock::irq_context
Signed-off-by: Boqun Feng
---
kernel/locking/lockdep.c | 23 +--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lock
Provide the proc filesystem interface for LOCKED_ACCESS, for a locked
access class whose name is , there will be a file at
/proc/locked_access/ containing all the information the
LOCKED_ACCESS has collected so far.
Also add a macro to define a locked access class.
Signed-off-by: Boqun Feng
ons.
This patch defines the structures for those concepts, along with the
manipulation operations. Besides, config option CONFIG_LOCKED_ACCESS
is introduced in this patch, too.
Signed-off-by: Boqun Feng
---
include/linux/lockdep.h| 17
kernel/locking/lockdep.c
LOCKED_ACCESS.
Signed-off-by: Boqun Feng
---
include/linux/lockdep.h | 29
kernel/locking/lockdep.c | 121 +++
2 files changed, 150 insertions(+)
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 2ffe6c3..cf7b6c8 100644
On Tue, Feb 02, 2016 at 12:20:25PM +, Will Deacon wrote:
[...]
> > > >
> > > > Besides, Will, what's the reason of having a locally transitive chain
> > > > termination? Because on some architectures RELEASE->DEPENDENCY pairs may
> > > > not be locally transitive?
> > >
> > > Well, the follow
On Tue, Feb 02, 2016 at 11:45:59AM +, Will Deacon wrote:
> On Tue, Feb 02, 2016 at 01:19:04PM +0800, Boqun Feng wrote:
> > On Mon, Feb 01, 2016 at 07:54:58PM -0800, Paul E. McKenney wrote:
> > > On Mon, Feb 01, 2016 at 01:56:22PM +, Will Deacon wrote:
> > > >
Hello Linus,
On Tue, Feb 02, 2016 at 12:19:04AM -0800, Linus Torvalds wrote:
> On Tue, Feb 2, 2016 at 12:07 AM, Linus Torvalds
> wrote:
> >
> > So we *absolutely* should say that *OF COURSE* these things work:
> >
> > - CPU A:
> >
> >.. initialize data structure -> smp_wmb() -> WRITE_ONCE(pt
Hi Paul,
On Mon, Feb 01, 2016 at 07:54:58PM -0800, Paul E. McKenney wrote:
> On Mon, Feb 01, 2016 at 01:56:22PM +, Will Deacon wrote:
> > On Fri, Jan 29, 2016 at 02:22:53AM -0800, Paul E. McKenney wrote:
> > > On Fri, Jan 29, 2016 at 09:59:59AM +, Will Deacon wrote:
> > > > On Thu, Jan 28,
ory barrier, implying global
transitivity.
This could give the readers an overview of the usage of this barrier.
> Cc: Boqun Feng
> Cc: Paul E. McKenney
> Cc: Peter Zijlstra
> Signed-off-by: Will Deacon
> ---
>
> Based on Paul's patch to describe local vs global
Hi Maciej,
On Wed, Jan 27, 2016 at 12:41:29PM +, Maciej W. Rozycki wrote:
> On Wed, 27 Jan 2016, Will Deacon wrote:
>
> > > Overall I think it should be safe after all to use SYNC_RELEASE and
> > > other
> > > modern lightweight barriers uncondtionally under the assumption that
> > > arch
On Tue, Jan 26, 2016 at 03:29:21PM -0800, Paul E. McKenney wrote:
> On Tue, Jan 26, 2016 at 02:33:40PM -0800, Linus Torvalds wrote:
> > On Tue, Jan 26, 2016 at 2:15 PM, Linus Torvalds
> > wrote:
> > >
> > > You might as well just write it as
> > >
> > > struct foo x = READ_ONCE(*ptr);
> > >
Hi Paul,
On Mon, Jan 18, 2016 at 07:46:29AM -0800, Paul E. McKenney wrote:
> On Mon, Jan 18, 2016 at 04:19:29PM +0800, Herbert Xu wrote:
> > Paul E. McKenney wrote:
> > >
> > > You could use SYNC_ACQUIRE() to implement read_barrier_depends() and
> > > smp_read_barrier_depends(), but SYNC_RMB prob
Hi Will,
On Tue, Jan 26, 2016 at 12:16:09PM +, Will Deacon wrote:
> On Mon, Jan 25, 2016 at 10:03:22PM -0800, Paul E. McKenney wrote:
> > On Mon, Jan 25, 2016 at 04:42:43PM +, Will Deacon wrote:
> > > On Fri, Jan 15, 2016 at 01:58:53PM -0800, Paul E. McKenney wrote:
> > > > PPC Overlapping
elease().
> >
> >
> > But I think removing smp_lwsync() is a good idea and actually I think we
> > can go further to remove __smp_lwsync() and let __smp_load_acquire and
> > __smp_store_release call __lwsync() directly, but that is another thing.
> >
> > Anyway, I will
therwise.
Implement atomic{,64}_{add,sub,inc,dec}_return_relaxed, and build other
variants with these helpers.
Signed-off-by: Boqun Feng
---
arch/powerpc/include/asm/atomic.h | 147 ++
1 file changed, 85 insertions(+), 62 deletions(-)
diff --git a/arch/powerpc/incl
Hi all,
I will resend this one to avoid a potential conflict with:
http://article.gmane.org/gmane.linux.kernel/2116880
by open coding smp_lwsync() with:
__asm__ __volatile__(PPC_ACQUIRE_BARRIER "" : : : "memory");
Regards,
Boqun
signature.asc
Description: PGP signature
On Tue, Jan 05, 2016 at 06:16:48PM +0200, Michael S. Tsirkin wrote:
[snip]
> > > > Another thing is that smp_lwsync() may have a third user(other than
> > > > smp_load_acquire() and smp_store_release()):
> > > >
> > > > http://article.gmane.org/gmane.linux.ports.ppc.embedded/89877
> > > >
> > > >
On Tue, Jan 05, 2016 at 10:51:17AM +0200, Michael S. Tsirkin wrote:
> On Tue, Jan 05, 2016 at 09:36:55AM +0800, Boqun Feng wrote:
> > Hi Michael,
> >
> > On Thu, Dec 31, 2015 at 09:07:42PM +0200, Michael S. Tsirkin wrote:
> > > This defines __smp_xxx barrier
Hi Michael,
On Thu, Dec 31, 2015 at 09:07:42PM +0200, Michael S. Tsirkin wrote:
> This defines __smp_xxx barriers for powerpc
> for use by virtualization.
>
> smp_xxx barriers are removed as they are
> defined correctly by asm-generic/barriers.h
>
> This reduces the amount of arch-specific boile
irq_common_data::state_use_accessors is not designed for public use.
Therefore make it private so that people who write code accessing it
directly will get blamed by sparse. Also #undef the macro
__irqd_to_state after used in header files, so that the macro can't be
misused.
Signed-off-by:
w_spinlock [usertype] *lock
| kernel/rcu/tree.c:4453:25:got struct raw_spinlock [noderef] *
Also, this patch improves compiler.h a little bit by adding comments for
"#else" and "#endif".
Signed-off-by: Boqun Feng
---
include/linux/compiler.h | 12
scripts/chec
replaced with
those wrappers.
Signed-off-by: Boqun Feng
---
kernel/rcu/tree.c| 103 ---
kernel/rcu/tree.h| 42 ++-
kernel/rcu/tree_plugin.h | 26 ++--
3 files changed, 96 insertions(+), 75 deletions(-)
diff --git a
Hi all,
This is v2 of __private.
Link for v1: http://marc.info/?l=linux-sparse&m=144988906932520&w=2
Change since v1:
* #undef __irqd_to_state after used (Peter Zijlstra)
This patchset introduces a __private modifier for sparse to detect misuses of
private members of structs. This could
On Sun, Dec 27, 2015 at 06:53:39PM +1100, Michael Ellerman wrote:
> On Wed, 2015-12-23 at 18:54 +0800, Boqun Feng wrote:
> > On Wed, Dec 23, 2015 at 01:40:05PM +1100, Michael Ellerman wrote:
> > > On Tue, 2015-12-15 at 22:24 +0800, Boqun Feng wrote:
> > > > Hi all,
On Wed, Dec 23, 2015 at 01:40:05PM +1100, Michael Ellerman wrote:
> On Tue, 2015-12-15 at 22:24 +0800, Boqun Feng wrote:
>
> > Hi all,
> >
> > This is v6 of the series.
> >
> > Link for v1: https://lkml.org/lkml/2015/8/27/798
> > Link for v2: https://l
701 - 800 of 996 matches
Mail list logo