Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount

2013-08-30 Thread Waiman Long
On 08/30/2013 04:26 PM, Al Viro wrote: On Fri, Aug 30, 2013 at 03:52:49PM -0400, Waiman Long wrote: So it is the mnput_no_expire() function that is doing all the lg_global_lock() calls. Interesting... So you are getting a lot of mntput() with ->mnt_ns being NULL? I wonder which type it

Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount

2013-08-30 Thread Waiman Long
On 08/30/2013 04:54 PM, Al Viro wrote: On Fri, Aug 30, 2013 at 01:43:11PM -0700, Linus Torvalds wrote: On Fri, Aug 30, 2013 at 1:15 PM, Waiman Long wrote: The prepend_path() isn't all due to getcwd. The correct profile should be Ugh. I really think that prepend_path() should ju

Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount

2013-08-30 Thread Waiman Long
On 08/30/2013 05:30 PM, Al Viro wrote: On Fri, Aug 30, 2013 at 05:10:45PM -0400, Waiman Long wrote: See above. You are right, but if Linus wants to turn that sucker into reader (which is possible - see e.g. cifs build_path_from_dentry() and its ilk), d_move() races will start to play. Thank

Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount

2013-08-30 Thread Waiman Long
On 08/30/2013 04:48 PM, Al Viro wrote: On Fri, Aug 30, 2013 at 04:35:49PM -0400, Waiman Long wrote: The AIM7 test was run on a set of 16 ramdisk formated with ext3 filesystem with the following mount options: barrier=0,async,noatime,nodiratime. Maybe that is a factor. I would be really

Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount

2013-09-02 Thread Waiman Long
On 08/30/2013 10:42 PM, Al Viro wrote: On Sat, Aug 31, 2013 at 03:35:16AM +0100, Al Viro wrote: Aha... OK, I see what's going on. We end up with shm_mnt *not* marked as long-living vfsmount, even though it lives forever. See if the following helps; if it does (and I very much expect it to),

Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount

2013-09-03 Thread Waiman Long
On 09/03/2013 02:01 AM, Ingo Molnar wrote: * Waiman Long wrote: Yes, that patch worked. It eliminated the lglock as a bottleneck in the AIM7 workload. The lg_global_lock did not show up in the perf profile, whereas the lg_local_lock was only 0.07%. Just curious: what's the worst bottl

Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount

2013-09-03 Thread Waiman Long
On 09/03/2013 03:09 PM, Linus Torvalds wrote: On Tue, Sep 3, 2013 at 8:34 AM, Linus Torvalds wrote: I suspect the tty_ldisc_lock() could be made to go away if we care. Heh. I just pulled the tty patches from Greg, and the locking has changed completely. It may actually fix your AIM7 test-cas

[PATCH] rwsem: reduce spinlock contention in wakeup code path

2013-09-27 Thread Waiman Long
syms] [k] _raw_spin_lock_irqsave |--0.94%-- rwsem_wake 1.00% reaim [kernel.kallsyms] [k] _raw_spin_lock_irq |--88.70%-- rwsem_down_write_failed Signed-off-by: Waiman Long --- include/linux/rwsem.h |2 ++ lib/rwsem.c | 19 +++ 2 files c

Re: [PATCH] rwsem: reduce spinlock contention in wakeup code path

2013-09-27 Thread Waiman Long
On 09/27/2013 03:32 PM, Peter Hurley wrote: On 09/27/2013 03:00 PM, Waiman Long wrote: With the 3.12-rc2 kernel, there is sizable spinlock contention on the rwsem wakeup code path when running AIM7's high_systime workload on a 8-socket 80-core DL980 (HT off) as reported by perf:

Re: [PATCH v6 5/6] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2013-09-27 Thread Waiman Long
On 09/27/2013 02:09 PM, Tim Chen wrote: On Fri, 2013-09-27 at 08:29 -0700, Paul E. McKenney wrote: On Wed, Sep 25, 2013 at 03:10:49PM -0700, Tim Chen wrote: We will need the MCS lock code for doing optimistic spinning for rwsem. Extracting the MCS code from mutex.c and put into its own file all

Re: [PATCH v6 5/6] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2013-09-30 Thread Waiman Long
On 09/28/2013 12:34 AM, Jason Low wrote: Also, below is what the mcs_spin_lock() and mcs_spin_unlock() functions would look like after applying the proposed changes. static noinline void mcs_spin_lock(struct mcs_spin_node **lock, struct mcs_spin_node *node) { struct mcs_spin_node *prev;

Re: [PATCH] rwsem: reduce spinlock contention in wakeup code path

2013-09-30 Thread Waiman Long
On 09/28/2013 03:33 PM, Linus Torvalds wrote: On Sat, Sep 28, 2013 at 12:21 PM, Ingo Molnar wrote: If we do that then I suspect the next step will be queued rwlocks :-/ The current rwlock_t implementation is rather primitive by modern standards. (We'd probably have killed rwlock_t long ago if n

Re: [PATCH] rwsem: reduce spinlock contention in wakeup code path

2013-09-30 Thread Waiman Long
On 09/30/2013 03:05 AM, Ingo Molnar wrote: * Michel Lespinasse wrote: That said, I am very scared of using rwlock_t here, and I would much prefer we choose a fair lock (either spinlock or a new rwlock implementation which guarantees not to starve any locker thread) Given how few users rwlock_

[PATCH v2] rwsem: reduce spinlock contention in wakeup code path

2013-09-30 Thread Waiman Long
|--88.70%-- rwsem_down_write_failed Signed-off-by: Waiman Long --- include/linux/rwsem.h |2 ++ lib/rwsem.c | 29 + 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 0616ffe..e25792e 100644 --- a/inc

Re: [PATCH v6 5/6] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2013-09-30 Thread Waiman Long
On 09/30/2013 12:10 PM, Jason Low wrote: On Mon, 2013-09-30 at 11:51 -0400, Waiman Long wrote: On 09/28/2013 12:34 AM, Jason Low wrote: Also, below is what the mcs_spin_lock() and mcs_spin_unlock() functions would look like after applying the proposed changes. static noinline void

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Waiman Long
On 09/30/2013 03:23 PM, Tim Chen wrote: On Mon, 2013-09-30 at 20:14 +0200, Peter Zijlstra wrote: On Mon, Sep 30, 2013 at 10:10:27AM -0700, Tim Chen wrote: Here's the exim workload data: rwsem improvment: Waimain's patch:+2.0% Alex+Tim's patchset:+4.8% Waiman+Alex+Tim:+5.3%

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-09-30 Thread Waiman Long
On 09/30/2013 03:29 PM, Linus Torvalds wrote: So with all the lockref work, we now avoid the dentry d_lock for almost all normal cases. There is one single remaining common case, though: the final dput() when the dentry count goes down to zero, and we need to check if we are supposed to get rid

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Waiman Long
On 09/30/2013 03:47 PM, Tim Chen wrote: My qrwlock doesn't enable qrwlock by default. You have to use menuconfig to explicitly enable it. Have you done that when you build the test kernel? I am thinking of explicitly enabling it for x86 if the anon-vma lock is converted back to a rwlock. Yes, I

[PATCH 2/2] sched, numa: reduce load/runnable_avg computation frequency

2013-09-23 Thread Waiman Long
those functions. Signed-off-by: Waiman Long --- init/Kconfig | 13 +++ kernel/sched/core.c |1 + kernel/sched/fair.c | 55 +- kernel/sched/sched.h | 23 4 files changed, 91 insertions(+), 1 deletions(-)

[PATCH 1/2] sched: reduce contention on tg's load_avg & runnable_avg

2013-09-23 Thread Waiman Long
s (from 139.8s to 139s) in this case. Signed-off-by: Waiman Long --- kernel/sched/fair.c | 29 ++--- kernel/sched/sched.h |6 -- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 68f1609..979f04d 10

[PATCH 0/2] sched: Reduce contention on tg's load_avg & runnable_avg

2013-09-23 Thread Waiman Long
These 2 patches try to reduce contention on the load_avg and runnable_avg values of the task_group structure in large NUMA machine by: patch 1: Move them into their own cacheline & reduce actual read/write to them. patch 2: Reduce the frequecy of doing the average computation. Wa

[PATCH v3 2/5] mutex: Queue mutex spinners with MCS lock to reduce cacheline contention

2013-04-16 Thread Waiman Long
probably due to the spinner locking and queuing overhead. Signed-off-by: Waiman Long Acked-by: Rik van Riel --- include/linux/mutex.h |3 ++ include/linux/sched.h |3 ++ kernel/mutex.c| 78 - kernel/sched/core.c | 24 +

[PATCH v3 5/5] mutex: Move mutex spinning code from sched/core.c back to mutex.c

2013-04-16 Thread Waiman Long
to kernel/mutex.c which is where they should belong. Signed-off-by: Waiman Long --- include/linux/sched.h |4 --- kernel/mutex.c | 62 ++ kernel/sched/core.c | 63 --- kernel/sched

[PATCH v3 0/5] mutex: Improve mutex performance by doing less atomic-ops & better spinning

2013-04-16 Thread Waiman Long
atch 5 removes SCHED_FEAT_OWNER_SPIN which was just an earlier hack for testing purpose. It also moves the mutex spinning code back to mutex.c. Waiman Long (5): mutex: Make more scalable by doing less atomic operations mutex: Queue mutex spinners with MCS lock to reduce cacheline contention m

[PATCH v3 4/5] mutex: Remove new typedefs introduced in patch 2

2013-04-16 Thread Waiman Long
In response to the review comment from Davidlohr, this patch will remove the new typedefs introduced by patch 2. It also removes an unnecessary barrier() call. Signed-off-by: Waiman Long --- kernel/mutex.c | 25 +++-- 1 files changed, 11 insertions(+), 14 deletions

[PATCH v3 optional 3/5] mutex: back out architecture specific check for negative mutex count

2013-04-16 Thread Waiman Long
this is not the case, this patch should be dropped. Signed-off-by: Waiman Long --- arch/x86/include/asm/mutex.h | 10 -- kernel/mutex.c |9 ++--- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/arch/x86/include/asm/mutex.h b/arch/x86/include/asm

[PATCH v3 1/5] mutex: Make more scalable by doing less atomic operations

2013-04-16 Thread Waiman Long
% | +4.2% | +--+---++-+ Signed-off-by: Waiman Long Reviewed-by: Davidlohr Bueso Reviewed-by: Rik van Riel --- arch/x86/include/asm/mutex.h | 10 ++ kernel/mutex.c | 19 --- 2 files changed, 26

[PATCH v4 0/4] mutex: Improve mutex performance by doing less atomic-ops & better spinning

2013-04-17 Thread Waiman Long
ance for the same workloads. Patch 4 is an optional one for backing out architecture specific check in patch 2, if so desired. Waiman Long (4): mutex: Move mutex spinning code from sched/core.c back to mutex.c mutex: Make more scalable by doing less atomic operations mutex: Queue mutex spinn

[PATCH v4 2/4] mutex: Make more scalable by doing less atomic operations

2013-04-17 Thread Waiman Long
% | +4.2% | +--+---++-+ Signed-off-by: Waiman Long Reviewed-by: Davidlohr Bueso Reviewed-by: Rik van Riel --- arch/x86/include/asm/mutex.h | 10 ++ kernel/mutex.c | 19 --- 2 files changed, 26

[PATCH v4 optional 4/4] mutex: back out architecture specific check for negative mutex count

2013-04-17 Thread Waiman Long
this is not the case, this patch should be dropped. Signed-off-by: Waiman Long --- arch/x86/include/asm/mutex.h | 10 -- kernel/mutex.c |9 ++--- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/arch/x86/include/asm/mutex.h b/arch/x86/include/asm

[PATCH v4 3/4] mutex: Queue mutex spinners with MCS lock to reduce cacheline contention

2013-04-17 Thread Waiman Long
probably due to the spinner locking and queuing overhead. Signed-off-by: Waiman Long Acked-by: Rik van Riel --- include/linux/mutex.h |3 ++ kernel/mutex.c| 91 - 2 files changed, 93 insertions(+), 1 deletions(-) diff --git a/include/linu

[PATCH v4 1/4] mutex: Move mutex spinning code from sched/core.c back to mutex.c

2013-04-17 Thread Waiman Long
to kernel/mutex.c which is where they should belong. Signed-off-by: Waiman Long --- include/linux/sched.h |1 - kernel/mutex.c | 46 ++ kernel/sched/core.c | 45 - kernel/sched/features.h

Re: [PATCH v3 5/5] mutex: Move mutex spinning code from sched/core.c back to mutex.c

2013-04-17 Thread Waiman Long
On 04/17/2013 03:18 AM, Ingo Molnar wrote: * Waiman Long wrote: As mentioned by Ingo, the SCHED_FEAT_OWNER_SPIN scheduler feature bit was really just an early hack to make with/without mutex-spinning testable. So it is no longer necessary. This patch removes the SCHED_FEAT_OWNER_SPIN feature

Re: [PATCH RFC ticketlock] Auto-queued ticketlock

2013-06-14 Thread Waiman Long
-2.8% | -3.3% | -2.1% | | shared | -0.6% | -0.2% | +0.2% | +--+---++-+ There are slight drops in performance for fsever and new_fserver workloads, but slight increase in the high_sys

Re: [PATCH RFC ticketlock] Auto-queued ticketlock

2013-06-14 Thread Waiman Long
On 06/14/2013 11:37 AM, Linus Torvalds wrote: On Fri, Jun 14, 2013 at 8:00 AM, Waiman Long wrote: On 06/12/2013 08:59 PM, Linus Torvalds wrote: Ho humm.. interesting. I was talking about wanting to mix atomics and spinlocks earlier in this thread due to space constraints, and it strikes me

Re: [PATCH RFC ticketlock] Auto-queued ticketlock

2013-06-14 Thread Waiman Long
On 06/14/2013 09:26 PM, Benjamin Herrenschmidt wrote: On Fri, 2013-06-14 at 14:17 -0400, Waiman Long wrote: With some minor changes, the current patch can be modified to support debugging lock for 32-bit system. For 64-bit system, we can apply a similar concept for debugging lock with

Re: [PATCH RFC 1/2] SELinux: reduce overhead of mls_level_isvalid() function call

2013-06-05 Thread Waiman Long
On 05/03/2013 10:07 AM, Waiman Long wrote: On 04/10/2013 02:26 PM, Waiman Long wrote: While running the high_systime workload of the AIM7 benchmark on a 2-socket 12-core Westmere x86-64 machine running 3.8.2 kernel, it was found that a pretty sizable amount of time was spent in the SELinux code

Re: [PATCH RFC 1/2] SELinux: reduce overhead of mls_level_isvalid() function call

2013-06-05 Thread Waiman Long
On 06/05/2013 10:59 AM, Stephen Smalley wrote: Can you take the core logic into a helper function within ebitmap.c? Otherwise you are directly exposing ebitmap internals to the mls code. Sure. I will move the logic to ebitmap.c & send out an updated patch. Thank for the quick response. Rega

[PATCH v2 1/2] SELinux: reduce overhead of mls_level_isvalid() function call

2013-06-05 Thread Waiman Long
00-2000 users | +--+---++-+ | high_systime | +0.1% | +0.9% | +2.6% | +--+---++-+ Signed-off-by: Waiman Long --- security/selinux/ss/ebitmap.c | 35 ++- security/selinux/ss/ebitmap.h |2

[PATCH v2 2/2] SELinux: Increase ebitmap_node size for 64-bit configuration

2013-06-05 Thread Waiman Long
overhead ratio at 1/4. This may also improve performance a little bit by making node to node traversal less frequent (< 2) as more bits are available in each node. Signed-off-by: Waiman Long --- security/selinux/ss/ebitmap.h |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) d

[PATCH 1/2 v3] SELinux: Reduce overhead of mls_level_isvalid() function call

2013-06-05 Thread Waiman Long
sers | 1100-2000 users | +--+---++-+ | high_systime | +0.1% | +0.9% | +2.6% | +--+---++-+ Signed-off-by: Waiman Long --- security/selinux/ss/eb

[PATCH RFC 0/2] Lockless update of reference count protected by spinlock

2013-06-19 Thread Waiman Long
The d_lock and d_count fields of the struct dentry in dcache.h was modified to use the new mechanism. This serves as an example of how to convert existing spinlock and reference count combo to use the new way of locklessly updating the reference count. Signed-off-by: Waiman Long Waiman Lo

[PATCH RFC 1/2] spinlock: New spinlock_refcount.h for lockless update of refcount

2013-06-19 Thread Waiman Long
UG_SPINLOCK=n 4. x86 32-bit SMP, CONFIG_DEBUG_SPINLOCK=n 5. x86 32-bit SMP, CONFIG_DEBUG_SPINLOCK=y Signed-off-by: Waiman Long --- include/linux/spinlock_refcount.h | 145 + include/linux/spinlock_types.h| 19 + 2 files changed, 164 insertions(

[PATCH RFC 2/2] dcache: Locklessly update d_count whenever possible

2013-06-19 Thread Waiman Long
.7% | -0.9% | | shared | -0.1% | 0.0% | -0.1% | +--+---++-+ There are slight drops in performance for fsever and new_fserver workloads, but slight increase in the high_systime workload. Signed-

Re: [PATCH 0/3 v3] dcache: make it more scalable on large system

2013-05-29 Thread Waiman Long
On 05/26/2013 10:09 PM, Dave Chinner wrote: On Thu, May 23, 2013 at 05:34:23PM -0400, Waiman Long wrote: On 05/23/2013 05:42 AM, Dave Chinner wrote: What was it I said about this patchset when you posted it to speed up an Oracle benchmark back in february? I'll repeat: "Nobody

Re: [PATCH 0/3 v3] dcache: make it more scalable on large system

2013-05-29 Thread Waiman Long
On 05/29/2013 12:13 PM, Andi Kleen wrote: The d_path() is called by perf_event_mmap_event() which translates VMA to its file path for memory segments backed by files. As perf is not just for sampling data within the kernel, it can also be used for checking access pattern in the user space. As a r

Re: [PATCH 0/3 v3] dcache: make it more scalable on large system

2013-05-29 Thread Waiman Long
On 05/29/2013 12:18 PM, Simo Sorce wrote: On Wed, 2013-05-29 at 11:55 -0400, Waiman Long wrote: My patch set consists of 2 different changes. The first one is to avoid taking the d_lock lock when updating the reference count in the dentries. This particular change also benefit some other

Re: [PATCH 0/3 v3] dcache: make it more scalable on large system

2013-05-29 Thread Waiman Long
On 05/29/2013 12:56 PM, Andi Kleen wrote: On Wed, May 29, 2013 at 12:18:09PM -0400, Simo Sorce wrote: To be honest a workload base on /etc/passwd or /etc/group is completely artificial, in actual usage, if you really have such access you use nscd or sssd with their shared memory caches to compl

Re: [PATCH 0/3 v3] dcache: make it more scalable on large system

2013-05-29 Thread Waiman Long
On 05/29/2013 02:46 PM, J. Bruce Fields wrote: On Wed, May 29, 2013 at 11:55:14AM -0400, Waiman Long wrote: On 05/26/2013 10:09 PM, Dave Chinner wrote: On Thu, May 23, 2013 at 05:34:23PM -0400, Waiman Long wrote: On 05/23/2013 05:42 AM, Dave Chinner wrote: What was it I said about this

Re: [PATCH 0/3 v3] dcache: make it more scalable on large system

2013-05-30 Thread Waiman Long
On 05/29/2013 05:19 PM, Jörn Engel wrote: On Wed, 29 May 2013 22:37:00 +0200, Andi Kleen wrote: As Dave said before, is the last path component sufficient? Or how about an inode number? Neither works, the profiler needs to find the file and read it. Ignoring all the complexity this would caus

Re: [PATCH RFC 0/2] Lockless update of reference count protected by spinlock

2013-06-24 Thread Waiman Long
On 06/19/2013 12:50 PM, Waiman Long wrote: This patchset supports a generic mechanism to atomically update a reference count that is protected by a spinlock without actually acquiring the lock itself. If the update doesn't succeeed, the caller will have to acquire the lock and updat

Re: [PATCH v2 1/2] SELinux: reduce overhead of mls_level_isvalid() function call

2013-06-07 Thread Waiman Long
On 06/07/2013 02:09 PM, Stephen Smalley wrote: Can't you unify this logic with the nearly identical logic below? By separating the logic, we can usually get the best performance out of the two separate loops. If code size and maintainability are a bigger concern, I can certainly merge the l

[PATCH 1/2 v4] SELinux: Reduce overhead of mls_level_isvalid() function call

2013-06-10 Thread Waiman Long
.9% | +2.6% | +--+---++-+ Signed-off-by: Waiman Long --- security/selinux/ss/ebitmap.c | 20 ++-- security/selinux/ss/ebitmap.h |2 +- security/selinux/ss/mls.c | 22 +++--- security/selinux/ss/mls_types.h |2 +- 4 files changed, 27 insertio

[PATCH 1/2 v5] SELinux: Reduce overhead of mls_level_isvalid() function call

2013-06-10 Thread Waiman Long
+0.9% | +2.6% | +--+---++-+ Signed-off-by: Waiman Long --- security/selinux/ss/ebitmap.c | 20 ++-- security/selinux/ss/ebitmap.h |2 +- security/selinux/ss/mls.c | 22 +++--- security/selinux/ss/ml

Re: [PATCH RFC ticketlock] Auto-queued ticketlock

2013-06-11 Thread Waiman Long
On 06/09/2013 03:36 PM, Paul E. McKenney wrote: Breaking up locks is better than implementing high-contention locks, but if we must have high-contention locks, why not make them automatically switch between light-weight ticket locks at low contention and queued locks at high contention? This com

Re: [PATCH RFC ticketlock] Auto-queued ticketlock

2013-06-11 Thread Waiman Long
On 06/11/2013 12:20 PM, Steven Rostedt wrote: diff --git a/arch/x86/include/asm/spinlock_types.h b/arch/x86/include/asm/spinlock_types.h index ad0ad07..cdaefdd 100644 --- a/arch/x86/include/asm/spinlock_types.h +++ b/arch/x86/include/asm/spinlock_types.h @@ -7,12 +7,18 @@ #include -#if (CON

Re: [PATCH RFC ticketlock] Auto-queued ticketlock

2013-06-11 Thread Waiman Long
On 06/11/2013 12:36 PM, Paul E. McKenney wrote: I am a bit concern about the size of the head queue table itself. RHEL6, for example, had defined CONFIG_NR_CPUS to be 4096 which mean a table size of 256. Maybe it is better to dynamically allocate the table at init time depending on the actual n

[PATCH v3 01/25] spinlock: A new lockref structure for lockless update of refcount

2013-07-03 Thread Waiman Long
ng the update. It is because there will still be some fair amount of contention with only one attempt. Signed-off-by: Waiman Long --- include/asm-generic/spinlock_refcount.h | 98 + include/linux/spinlock_refcount.h | 159 + kernel/Kconfig.locks

[PATCH v3 02/25] spinlock: Enable x86 architecture to do lockless refcount update

2013-07-03 Thread Waiman Long
-by: Waiman Long --- arch/x86/Kconfig |3 +++ arch/x86/include/asm/spinlock_refcount.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) create mode 100644 arch/x86/include/asm/spinlock_refcount.h diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index fe120da

[PATCH v3 04/25] powerpc: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- arch/powerpc/platforms/cell/spufs/inode.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 35f77a4..3597c4b 100644

[PATCH v3 13/25] vfs: Change how dentry's d_lock and d_count fields are accessed

2013-07-03 Thread Waiman Long
t are replaced by the d_ret_count() calls. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/dcookies.c |8 fs/fs-writeback.c |4 ++-- fs/libfs.c| 36 ++-- fs/namei.c|

[PATCH v3 11/25] coda-fs: Change how dentry's d_lock and d_count fields are accessed

2013-07-03 Thread Waiman Long
t are replaced by the d_ret_count() calls. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/coda/cache.c |4 ++-- fs/coda/dir.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/coda/cache.c b/fs/coda/cache.c

[PATCH v3 06/25] 9p-fs: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- fs/9p/fid.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/9p/fid.c b/fs/9p/fid.c index d51ec9f..fc23dd3 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c @@ -48,9 +48,9 @@ static inline void __add_fid(s

[PATCH v3 09/25] ceph-fs: Change how dentry's d_lock and d_count fields are accessed

2013-07-03 Thread Waiman Long
t are replaced by the d_ret_count() calls. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/ceph/caps.c |8 fs/ceph/debugfs.c|8 fs/ceph/dir.c| 34 +- fs/ceph/export.c |

[PATCH v3 03/25] dcache: Enable lockless update of d_count in dentry structure

2013-07-03 Thread Waiman Long
| +1.2% | +0.3% | | shared | +0.8% | -0.3% | 0.0% | +--+---++-+ There are slight drops in performance for the five_sec workload, but slight increase in the high_systime workload. Signed-off-

[PATCH v3 07/25] afs-fs: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- fs/afs/dir.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 7a465ed..fa235e0 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -705,9 +705,9 @@ out_skip: /* the diren

[PATCH v3 05/25] infiniband: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- drivers/infiniband/hw/ipath/ipath_fs.c |6 +++--- drivers/infiniband/hw/qib/qib_fs.c |6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/

[PATCH v3 10/25] cifs: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- fs/cifs/dir.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 5699b50..51d9f7e 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -115,10 +115,10 @@ cifs_bp_rename_

[PATCH v3 08/25] auto-fs: Change how dentry's d_lock and d_count fields are accessed

2013-07-03 Thread Waiman Long
t are replaced by the d_ret_count() calls. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/autofs4/autofs_i.h | 24 fs/autofs4/expire.c | 48 fs/autofs4/root.c |

[PATCH v3 20/25] nilfs2: Change how dentry's d_count field is accessed

2013-07-03 Thread Waiman Long
Because of the changes made in dcache.h header file, files that use the d_count field of the dentry structure need to be changed accordingly. References to d_count are replaced by the d_ret_count() calls. There is no change in logic and everything should just work. Signed-off-by: Waiman Long

[PATCH v3 25/25] selinux: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- security/selinux/selinuxfs.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index ff42773..c83a201 100644 --- a/security/selinux/selinu

[PATCH v3 19/25] nfs: Change how dentry's d_lock and d_count fields are accessed

2013-07-03 Thread Waiman Long
t are replaced by the d_ret_count() calls. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/nfs/dir.c | 14 +++--- fs/nfs/getroot.c |8 fs/nfs/namespace.c | 16 fs/nfs/unlink.c|

[PATCH v3 15/25] export-fs: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- fs/exportfs/expfs.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 262fc99..9cf6a44 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c @@ -114,15 +1

[PATCH v3 14/25] ecrypt-fs: Change how dentry's d_count field is accessed

2013-07-03 Thread Waiman Long
Because of the changes made in dcache.h header file, files that use the d_count field of the dentry structure need to be changed accordingly. References to d_count are replaced by the d_ret_count() calls. There is no change in logic and everything should just work. Signed-off-by: Waiman Long

[PATCH v3 24/25] sunrpc: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- net/sunrpc/rpc_pipe.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index e7ce4b3..58bc128 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -4

[PATCH v3 21/25] fsnotify: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- fs/notify/fsnotify.c |8 fs/notify/vfsmount_mark.c| 24 include/linux/fsnotify_backend.h |6 +++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/fs/n

[PATCH v3 17/25] file locking: Change how dentry's d_lock and d_count fields are accessed

2013-07-03 Thread Waiman Long
t are replaced by the d_ret_count() calls. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/locks.c |2 +- include/linux/fs.h |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/locks.c b/fs/locks.c index cb

[PATCH v3 23/25] cgroup: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- kernel/cgroup.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index a7c9e6d..8935c05 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -974,11 +974,11 @@ static

[PATCH v3 12/25] config-fs: Change how dentry's d_lock and d_count fields are accessed

2013-07-03 Thread Waiman Long
t are replaced by the d_ret_count() calls. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/configfs/configfs_internal.h |4 ++-- fs/configfs/dir.c |2 +- fs/configfs/inode.c |6 +++--- 3 files changed, 6 inser

[PATCH v3 22/25] ocfs2: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- fs/ocfs2/dcache.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c index ef99972..4f72906 100644 --- a/fs/ocfs2/dcache.c +++ b/fs/ocfs2/dcache.c @@ -173,17 +173,17 @@ s

[PATCH v3 16/25] vfat: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- fs/fat/namei_vfat.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index 2da9520..722ca30 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c @@ -34,10 +

[PATCH v3 18/25] ncp-fs: Change how dentry's d_lock field is accessed

2013-07-03 Thread Waiman Long
c and everything should just work. Signed-off-by: Waiman Long --- fs/ncpfs/dir.c |6 +++--- fs/ncpfs/ncplib_kernel.h |8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 6792ce1..c78b801 100644 --- a/fs/ncpfs/dir.c +++ b/fs/

[PATCH v3 00/25] Lockless update of reference count protected by spinlock

2013-07-03 Thread Waiman Long
entry structure. Thank to Thomas Gleixner, Andi Kleen and Linus for their valuable input in shaping this patchset. Signed-off-by: Waiman Long Waiman Long (25): spinlock: A new lockref structure for lockless update of refcount spinlock: Enable x86 architecture to do lockless refcount update

Re: [PATCH v3 03/25] dcache: Enable lockless update of d_count in dentry structure

2013-07-03 Thread Waiman Long
On 07/03/2013 04:37 PM, Linus Torvalds wrote: This patch grew a lot, and that seems to be mainly because of bad reasons. That is the main reason why I choose to implement it the way it was in my previous version. As I add one more level to access d_lock and d_count, I need to change a lot mor

[PATCH 0/4] seqlock: Add new blocking reader type & use rwlock

2013-07-03 Thread Waiman Long
n the short workload of the AIM7 benchmark running on a 8-socket 80-core DL980 machine on a 3.10-based kernel. There were still a few percentage points of contention in d_path() and getcwd syscall left due to their use of the rename_lock. Signed-off-by: Waiman Long Waiman Long (4): seqlock: Ad

[PATCH 1/4] seqlock: Add a new blocking reader type

2013-07-03 Thread Waiman Long
w blocking reader will not block other non-blocking readers, but will block other blocking readers and writers. Signed-off-by: Waiman Long --- include/linux/seqlock.h | 65 +++--- 1 files changed, 60 insertions(+), 5 deletions(-) diff --git a/include/linux/s

[PATCH 4/4] dcache: Use rwlock as the underlying lock in rename_lock

2013-07-03 Thread Waiman Long
tool is used to record performance data on a large SMP system with many cores, converting rename_lock to use read/write lock will eliminate this bottleneck and the skewing of perf trace data. Signed-off-by: Waiman Long --- fs/dcache.c |2 +- 1 files changed, 1 insertions(+), 1 deletions

[PATCH 2/4] dcache: Use blocking reader seqlock when protected data are not changed

2013-07-03 Thread Waiman Long
. d_path 4. dentry_path_raw 5. dentry_path 6. getcwd syscall Signed-off-by: Waiman Long --- fs/dcache.c | 26 +- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index f09b908..480c81f 100644 --- a/fs/dcache.c +++ b/fs/dcache.c

[PATCH 3/4] seqlock: Allow the use of rwlock in seqlock

2013-07-03 Thread Waiman Long
-off-by: Waiman Long --- include/linux/seqlock.h | 118 -- 1 files changed, 92 insertions(+), 26 deletions(-) diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 26be0d9..a1fd45c 100644 --- a/include/linux/seqlock.h +++ b/include/linux

[PATCH v4 00/12] Lockless update of reference count protected by spinlock

2013-07-03 Thread Waiman Long
ructure to use the lockref structure to improve performance for high contention cases Thank to Thomas Gleixner, Andi Kleen and Linus for their valuable input in shaping this patchset. Signed-off-by: Waiman Long Waiman Long (12): spinlock: A new lockref structure f

[PATCH v4 04/12] auto-fs: rename d_count field of dentry to d_refcount

2013-07-03 Thread Waiman Long
Because of the d_count name change made in dcache.h, all references to d_count have to be changed to d_refcount. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/autofs4/expire.c |8 fs/autofs4/root.c |2 +- 2 files changed, 5

[PATCH v4 03/12] dcache: rename d_count field of dentry to d_refcount

2013-07-03 Thread Waiman Long
d_count field name to a different one which is unique in the kernel source code. The new name will be d_refcount. Signed-off-by: Waiman Long --- fs/dcache.c| 54 fs/namei.c |6 ++-- include/linux/dcache.h |6 ++-- 3

[PATCH v4 06/12] coda-fs: rename d_count field of dentry to d_refcount

2013-07-03 Thread Waiman Long
Because of the d_count name change made in dcache.h, all references to d_count have to be changed to d_refcount. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/coda/dir.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH v4 11/12] nilfs2: rename d_count field of dentry to d_refcount

2013-07-03 Thread Waiman Long
Because of the d_count name change made in dcache.h, all references to d_count have to be changed to d_refcount. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/nilfs2/super.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH v4 07/12] config-fs: rename d_count field of dentry to d_refcount

2013-07-03 Thread Waiman Long
Because of the d_count name change made in dcache.h, all references to d_count have to be changed to d_refcount. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/configfs/dir.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH v4 08/12] ecrypt-fs: rename d_count field of dentry to d_refcount

2013-07-03 Thread Waiman Long
Because of the d_count name change made in dcache.h, all references to d_count have to be changed to d_refcount. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/ecryptfs/inode.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

[PATCH v4 09/12] file locking: rename d_count field of dentry to d_refcount

2013-07-03 Thread Waiman Long
Because of the d_count name change made in dcache.h, all references to d_count have to be changed to d_refcount. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/locks.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs

[PATCH v4 10/12] nfs: rename d_count field of dentry to d_refcount

2013-07-03 Thread Waiman Long
Because of the d_count name change made in dcache.h, all references to d_count have to be changed to d_refcount. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/nfs/dir.c|8 fs/nfs/unlink.c |2 +- 2 files changed, 5 insertions

[PATCH v4 05/12] ceph-fs: rename d_count field of dentry to d_refcount

2013-07-03 Thread Waiman Long
Because of the d_count name change made in dcache.h, all references to d_count have to be changed to d_refcount. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/ceph/inode.c |4 ++-- fs/ceph/mds_client.c |2 +- 2 files changed, 3

[PATCH v4 12/12] dcache: Enable lockless update of refcount in dentry structure

2013-07-03 Thread Waiman Long
won't work for those macros and so the errors should be ignored. Signed-off-by: Waiman Long --- fs/dcache.c| 18 -- include/linux/dcache.h | 17 ++--- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index 61d

<    1   2   3   4   5   6   7   8   9   10   >