Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1560788
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/9] slab: remove synchronous rcu_barrier() call in memcg cache release path |
| Date | 2017-01-17 17:40 +0100 |
| Message-ID | <t0EXF-VQ-45@gated-at.bofh.it> (permalink) |
| References | <sZpxE-2ag-3@gated-at.bofh.it> <sZpxE-2ag-13@gated-at.bofh.it> <sZwz8-6t0-13@gated-at.bofh.it> <sZyhz-7vW-3@gated-at.bofh.it> <t0pvz-85c-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello, Joonsoo. On Tue, Jan 17, 2017 at 09:07:54AM +0900, Joonsoo Kim wrote: > Long time no see! :) Yeah, happy new year! > IIUC, rcu_barrier() here prevents to destruct the kmem_cache until all > slab pages in it are freed. These slab pages are freed through call_rcu(). Hmm... why do we need that tho? SLAB_DESTROY_BY_RCU only needs to protect the slab pages, not kmem cache struct. I thought that this was because kmem cache destruction is allowed to release pages w/o RCU delaying it. > Your patch changes it to another call_rcu() and, I think, if sequence of > executing rcu callbacks is the same with sequence of adding rcu > callbacks, it would work. However, I'm not sure that it is > guaranteed by RCU API. Am I missing something? The call sequence doesn't matter. Whether you're using call_rcu() or rcu_barrier(), you're just waiting for a grace period to pass before continuing. It doens't give any other ordering guarantees, so the new code should be equivalent to the old one except for being asynchronous. Thanks. -- tejun
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 2/9] slab: remove synchronous rcu_barrier() call in memcg cache release path Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2017-01-17 01:10 +0100
Re: [PATCH 2/9] slab: remove synchronous rcu_barrier() call in memcg cache release path Tejun Heo <tj@kernel.org> - 2017-01-17 17:40 +0100
Re: [PATCH 2/9] slab: remove synchronous rcu_barrier() call in memcg cache release path Tejun Heo <tj@kernel.org> - 2017-01-17 20:10 +0100
csiph-web