From: Waiman Long <waiman.long@hpe.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Jan Kara <jack@suse.com>, Jeff Layton <jlayton@poochiereds.net>,
"J. Bruce Fields" <bfields@fieldses.org>,
Tejun Heo <tj@kernel.org>,
Christoph Lameter <cl@linux-foundation.org>,
<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Dave Chinner <dchinner@redhat.com>,
Boqun Feng <boqun.feng@gmail.com>,
Scott J Norton <scott.norton@hpe.com>,
Douglas Hatch <doug.hatch@hpe.com>
Subject: Re: [RESEND PATCH 1/5] lib/dlock-list: Distributed and lock-protected lists
Date: Tue, 7 Jun 2016 19:53:43 -0400 [thread overview]
Message-ID: <57575E87.1070905@hpe.com> (raw)
In-Reply-To: <20160607201340.GL13997@two.firstfloor.org>
On 06/07/2016 04:13 PM, Andi Kleen wrote:
> On Tue, Jun 07, 2016 at 03:35:51PM -0400, 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 list APIs that provide a set of distributed
>> lists (one per CPU), each of which is protected by its own spinlock.
> One thing I don't like is that it is per CPU. One per CPU is almost
> certainly overkill and not needed for true scalability, especially
> on systems using SMT. Also it makes the case where everything has to
> be walked more and more expensive, because all these locks have to
> be taken. Even when not contended this will add up.
>
> It would be better to do this per every Nth CPU. Now I don't have
> a clear answer what the best N is, but I'm pretty sure it's> 1.
> For example at least on SMT systems only per core instead of per
> thread. Likely even more coarse grained, although per socket
> may be not good enough.
>
> -Andi
Thanks for the comment. That will need a new per group of cpus construct
somewhere between per-cpu and per-node. I will think about this a bit to
see how to move forward.
Cheers,
Longman
next prev parent reply other threads:[~2016-06-07 23:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 19:35 [RESEND PATCH 0/5] vfs: Use dlock list for SB's s_inodes list Waiman Long
2016-06-07 19:35 ` [RESEND PATCH 1/5] lib/dlock-list: Distributed and lock-protected lists Waiman Long
2016-06-07 20:13 ` Andi Kleen
2016-06-07 23:53 ` Waiman Long [this message]
2016-07-11 17:37 ` Waiman Long
2016-06-07 19:35 ` [RESEND PATCH 2/5] lib/dlock-list: Add __percpu modifier for parameters Waiman Long
2016-06-07 19:35 ` [RESEND PATCH 3/5] fsnotify: Simplify inode iteration on umount Waiman Long
2016-06-07 19:35 ` [RESEND PATCH 4/5] vfs: Remove unnecessary list_for_each_entry_safe() variants Waiman Long
2016-06-07 19:35 ` [RESEND PATCH 5/5] vfs: Use dlock list for superblock's inode list Waiman Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57575E87.1070905@hpe.com \
--to=waiman.long@hpe.com \
--cc=andi@firstfloor.org \
--cc=bfields@fieldses.org \
--cc=boqun.feng@gmail.com \
--cc=cl@linux-foundation.org \
--cc=dchinner@redhat.com \
--cc=doug.hatch@hpe.com \
--cc=jack@suse.com \
--cc=jlayton@poochiereds.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=scott.norton@hpe.com \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.