Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1712626
| From | kemi <kemi.wang@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] mm: Update NUMA counter threshold size |
| Date | 2017-08-16 05:10 +0200 |
| Message-ID | <ueWSt-1ER-15@gated-at.bofh.it> (permalink) |
| References | <ueFHY-7rw-7@gated-at.bofh.it> <ueFHY-7rw-19@gated-at.bofh.it> <ueGNI-870-21@gated-at.bofh.it> <ueNma-3Lx-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2017年08月16日 00:55, Tim Chen wrote: > On 08/15/2017 02:58 AM, Mel Gorman wrote: >> On Tue, Aug 15, 2017 at 04:45:36PM +0800, Kemi Wang wrote: >> I'm fairly sure this pushes the size of that structure into the next >> cache line which is not welcome. >>>> vm_numa_stat_diff is an always incrementing field. How much do you gain >> if this becomes a u8 code and remove any code that deals with negative >> values? That would double the threshold without consuming another cache line. > > Doubling the threshold and counter size will help, but not as much > as making them above u8 limit as seen in Kemi's data: > > 125 537 358906028 <==> system by default (base) > 256 468 412397590 > 32765 394(-26.6%) 488932078(+36.2%) <==> with this patchset > > For small system making them u8 makes sense. For larger ones the > frequent local counter overflow into the global counter still > causes a lot of cache bounce. Kemi can perhaps collect some data > to see what is the gain from making the counters u8. > Tim, thanks for your answer. That is what I want to clarify. Also, pls notice that the negative threshold/2 is set to cpu local counter (e.g. vm_numa_stat_diff[]) once per-zone counter is updated in current code path. This weakens the benefit of changing s8 to u8 in this case. >> >> Furthermore, the stats in question are only ever incremented by one. >> That means that any calcluation related to overlap can be removed and >> special cased that it'll never overlap by more than 1. That potentially >> removes code that is required for other stats but not locality stats. >> This may give enough savings to avoid moving to s16. >> >> Very broadly speaking, I like what you're doing but I would like to see >> more work on reducing any unnecessary code in that path (such as dealing >> with overlaps for single increments) and treat incrasing the cache footprint >> only as a very last resort. >> Agree. I will think about it more. >>> #endif >>> #ifdef CONFIG_SMP >>> s8 stat_threshold; >>> diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h >>> index 1e19379..d97cc34 100644 >>> --- a/include/linux/vmstat.h >>> +++ b/include/linux/vmstat.h >>> @@ -125,10 +125,14 @@ static inline unsigned long global_numa_state(enum zone_numa_stat_item item) >>> return x; >>> } >>>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] Separate NUMA statistics from zone statistics Kemi Wang <kemi.wang@intel.com> - 2017-08-15 10:50 +0200
[PATCH 1/2] mm: Change the call sites of numa statistics items Kemi Wang <kemi.wang@intel.com> - 2017-08-15 10:50 +0200
Re: [PATCH 1/2] mm: Change the call sites of numa statistics items Mel Gorman <mgorman@techsingularity.net> - 2017-08-15 11:50 +0200
Re: [PATCH 1/2] mm: Change the call sites of numa statistics items kemi <kemi.wang@intel.com> - 2017-08-16 04:20 +0200
[PATCH 2/2] mm: Update NUMA counter threshold size Kemi Wang <kemi.wang@intel.com> - 2017-08-15 10:50 +0200
Re: [PATCH 2/2] mm: Update NUMA counter threshold size Mel Gorman <mgorman@techsingularity.net> - 2017-08-15 12:00 +0200
Re: [PATCH 2/2] mm: Update NUMA counter threshold size Tim Chen <tim.c.chen@linux.intel.com> - 2017-08-15 19:00 +0200
Re: [PATCH 2/2] mm: Update NUMA counter threshold size Mel Gorman <mgorman@techsingularity.net> - 2017-08-15 19:40 +0200
Re: [PATCH 2/2] mm: Update NUMA counter threshold size Tim Chen <tim.c.chen@linux.intel.com> - 2017-08-15 20:00 +0200
Re: [PATCH 2/2] mm: Update NUMA counter threshold size Mel Gorman <mgorman@techsingularity.net> - 2017-08-15 21:10 +0200
Re: [PATCH 2/2] mm: Update NUMA counter threshold size kemi <kemi.wang@intel.com> - 2017-08-16 05:10 +0200
Re: [PATCH 2/2] mm: Update NUMA counter threshold size kemi <kemi.wang@intel.com> - 2017-08-16 04:40 +0200
Re: [PATCH 2/2] mm: Update NUMA counter threshold size kemi <kemi.wang@intel.com> - 2017-08-22 05:30 +0200
Re: [PATCH 2/2] mm: Update NUMA counter threshold size Mel Gorman <mgorman@techsingularity.net> - 2017-08-22 10:40 +0200
Re: [PATCH 0/2] Separate NUMA statistics from zone statistics Jesper Dangaard Brouer <brouer@redhat.com> - 2017-08-15 12:40 +0200
Re: [PATCH 0/2] Separate NUMA statistics from zone statistics kemi <kemi.wang@intel.com> - 2017-08-16 05:30 +0200
Re: [PATCH 0/2] Separate NUMA statistics from zone statistics Christopher Lameter <cl@linux.com> - 2017-08-22 23:30 +0200
Re: [PATCH 0/2] Separate NUMA statistics from zone statistics Andi Kleen <andi@firstfloor.org> - 2017-08-23 01:20 +0200
Re: [PATCH 0/2] Separate NUMA statistics from zone statistics kemi <kemi.wang@intel.com> - 2017-08-23 03:20 +0200
Re: [PATCH 0/2] Separate NUMA statistics from zone statistics Dave Hansen <dave.hansen@linux.intel.com> - 2017-08-23 07:00 +0200
csiph-web