Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670993
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] writeback: Rework wb_[dec|inc]_stat family of functions |
| Date | 2017-06-20 19:40 +0200 |
| Message-ID | <tUvib-3ak-37@gated-at.bofh.it> (permalink) |
| References | <tUpFN-81d-33@gated-at.bofh.it> <tUpFN-81d-57@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello, On Tue, Jun 20, 2017 at 02:36:30PM +0300, Nikolay Borisov wrote: > Currently the writeback statistics code uses a percpu counters to hold > various statistics. As such we have 2 families of functions - those which > disable local irq and those which doesn't and whose names are begin with > double underscore. However, they both end up calling __add_wb_stats which in > turn end up calling percpu_counter_add_batch which is already SMP-safe. There's a difference between being SMP-safe and being preemption / irq save. Even on UP machine, rmw cycles can go wrong due to different contexts operating on the same memory area, but you're right, all percpu counter ops are irq safe, so there's no reason for wb stat operations to have different variants. > Exploiting this fact allows to eliminated the __wb_* functions since they do > in fact cal SMP-safe primitive. Furthermore, refactor the wb_* function > to call __add_wb_stat directly without the irq-disabling dance. This will > likely result in better runtime of code which deals with modifying the stat > counters. > > Signed-off-by: Nikolay Borisov <nborisov@suse.com> > --- > Hello Tejun, > > This patch resulted from me reading your feedback on Josef's memory > throttling prep patch https://patchwork.kernel.org/patch/9395219/ . If these > changes are merged then his series can eliminated irq clustering and use > straight __add_wb_stat call. I'd like to see his series merged sooner rather > than later hence why sending this cleanup. Sure, but can you please update the patch description? Thanks. -- tejun
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch Nikolay Borisov <nborisov@suse.com> - 2017-06-20 13:40 +0200
[PATCH 2/2] writeback: Rework wb_[dec|inc]_stat family of functions Nikolay Borisov <nborisov@suse.com> - 2017-06-20 13:40 +0200
Re: [PATCH 2/2] writeback: Rework wb_[dec|inc]_stat family of functions Tejun Heo <tj@kernel.org> - 2017-06-20 19:40 +0200
[PATCH v2 2/2] writeback: Rework wb_[dec|inc]_stat family of functions Nikolay Borisov <nborisov@suse.com> - 2017-06-20 20:10 +0200
Re: [PATCH v2 2/2] writeback: Rework wb_[dec|inc]_stat family of functions Tejun Heo <tj@kernel.org> - 2017-06-20 21:40 +0200
Re: [PATCH v2 2/2] writeback: Rework wb_[dec|inc]_stat family of functions Nikolay Borisov <nborisov@suse.com> - 2017-06-20 22:30 +0200
Re: [PATCH v2 2/2] writeback: Rework wb_[dec|inc]_stat family of functions Tejun Heo <tj@kernel.org> - 2017-06-20 22:40 +0200
Re: [PATCH v2 2/2] writeback: Rework wb_[dec|inc]_stat family of functions Nikolay Borisov <nborisov@suse.com> - 2017-06-20 22:40 +0200
[PATCH v3] writeback: Rework wb_[dec|inc]_stat family of functions Nikolay Borisov <nborisov@suse.com> - 2017-06-21 09:30 +0200
Re: [PATCH v3] writeback: Rework wb_[dec|inc]_stat family of functions Tejun Heo <tj@kernel.org> - 2017-06-21 18:40 +0200
Re: [PATCH v3] writeback: Rework wb_[dec|inc]_stat family of functions Jan Kara <jack@suse.cz> - 2017-06-22 11:20 +0200
Re: [PATCH 1/2] percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch Tejun Heo <tj@kernel.org> - 2017-06-20 19:30 +0200
[PATCH v2 1/2] percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch Nikolay Borisov <nborisov@suse.com> - 2017-06-20 20:10 +0200
[PATCH] percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch Tejun Heo <tj@kernel.org> - 2017-06-20 21:50 +0200
Re: [PATCH] percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch David Miller <davem@davemloft.net> - 2017-06-20 22:00 +0200
Re: [PATCH] percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch "Darrick J. Wong" <darrick.wong@oracle.com> - 2017-06-21 03:20 +0200
Re: [PATCH] percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch David Sterba <dsterba@suse.cz> - 2017-06-21 14:10 +0200
csiph-web