Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1441401
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH v2 6/7] lib/persubnode: Introducing a simple per-subnode APIs |
| Date | 2016-07-12 16:30 +0200 |
| Message-ID | <rU6Rc-66R-15@gated-at.bofh.it> (permalink) |
| References | <rTNlv-1Jn-5@gated-at.bofh.it> <rTNlw-1Jn-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello, On Mon, Jul 11, 2016 at 01:32:11PM -0400, Waiman Long wrote: > The percpu APIs are extensively used in the Linux kernel to reduce > cacheline contention and improve performance. For some use cases, the > percpu APIs may be too fine-grain for distributed resources whereas > a per-node based allocation may be too coarse as we can have dozens > of CPUs in a NUMA node in some high-end systems. > > This patch introduces a simple per-subnode APIs where each of the > distributed resources will be shared by only a handful of CPUs within > a NUMA node. The per-subnode APIs are built on top of the percpu APIs > and hence requires the same amount of memory as if the percpu APIs > are used. However, it helps to reduce the total number of separate > resources that needed to be managed. As a result, it can speed up code > that need to iterate all the resources compared with using the percpu > APIs. Cacheline contention, however, will increases slightly as each > resource is shared by more than one CPU. As long as the number of CPUs > in each subnode is small, the performance impact won't be significant. > > In this patch, at most 2 sibling groups can be put into a subnode. For > an x86-64 CPU, at most 4 CPUs will be in a subnode when HT is enabled > and 2 when it is not. I understand that there's a trade-off between local access and global traversing and you're trying to find a sweet spot between the two, but this seems pretty arbitrary. What's the use case? What are the numbers? Why are global traversals often enough to matter so much? Thanks. -- tejun
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/7] vfs: Use dlock list for SB's s_inodes list Waiman Long <Waiman.Long@hpe.com> - 2016-07-11 19:40 +0200
[RFC PATCH v2 7/7] lib/dlock-list: Use the per-subnode APIs for managing lists Waiman Long <Waiman.Long@hpe.com> - 2016-07-11 19:40 +0200
[PATCH v2 1/7] lib/dlock-list: Distributed and lock-protected lists Waiman Long <Waiman.Long@hpe.com> - 2016-07-11 19:40 +0200
Re: [PATCH v2 1/7] lib/dlock-list: Distributed and lock-protected lists Tejun Heo <tj@kernel.org> - 2016-07-13 18:20 +0200
Re: [PATCH v2 1/7] lib/dlock-list: Distributed and lock-protected lists Tejun Heo <tj@kernel.org> - 2016-07-14 14:00 +0200
Re: [PATCH v2 1/7] lib/dlock-list: Distributed and lock-protected lists Jan Kara <jack@suse.cz> - 2016-07-14 16:40 +0200
Re: [PATCH v2 1/7] lib/dlock-list: Distributed and lock-protected lists Tejun Heo <tj@kernel.org> - 2016-07-14 17:00 +0200
Re: [PATCH v2 1/7] lib/dlock-list: Distributed and lock-protected lists Tejun Heo <tj@kernel.org> - 2016-07-14 19:50 +0200
[PATCH v2 2/7] lib/dlock-list: Add __percpu modifier for parameters Waiman Long <Waiman.Long@hpe.com> - 2016-07-11 19:40 +0200
Re: [PATCH v2 2/7] lib/dlock-list: Add __percpu modifier for parameters Tejun Heo <tj@kernel.org> - 2016-07-13 18:20 +0200
[PATCH v2 5/7] vfs: Use dlock list for superblock's inode list Waiman Long <Waiman.Long@hpe.com> - 2016-07-11 19:40 +0200
[PATCH v2 3/7] fsnotify: Simplify inode iteration on umount Waiman Long <Waiman.Long@hpe.com> - 2016-07-11 19:40 +0200
[RFC PATCH v2 6/7] lib/persubnode: Introducing a simple per-subnode APIs Waiman Long <Waiman.Long@hpe.com> - 2016-07-11 19:40 +0200
Re: [RFC PATCH v2 6/7] lib/persubnode: Introducing a simple per-subnode APIs Boqun Feng <boqun.feng@gmail.com> - 2016-07-12 05:20 +0200
Re: [RFC PATCH v2 6/7] lib/persubnode: Introducing a simple per-subnode APIs Tejun Heo <tj@kernel.org> - 2016-07-12 16:30 +0200
Re: [RFC PATCH v2 6/7] lib/persubnode: Introducing a simple per-subnode APIs Tejun Heo <tj@kernel.org> - 2016-07-12 21:00 +0200
csiph-web