Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1648633
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe |
| Date | 2017-05-23 22:50 +0200 |
| Message-ID | <tKoUI-8uq-75@gated-at.bofh.it> (permalink) |
| References | <tILC2-7Vr-13@gated-at.bofh.it> <tIRxL-3EK-3@gated-at.bofh.it> <tJ6ZP-6r8-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello, Paolo. On Sat, May 20, 2017 at 09:27:33AM +0200, Paolo Valente wrote: > Consider a process or a group that is moved from a given source group > to a different group, or simply removed from a group (although I > didn't yet succeed in just removing a process from a group :) ). The > pointer to the [b|c]fq_group contained in the schedulable entity > belonging to the source group *is not* updated, in BFQ, if the entity > is idle, and *is not* updated *unconditionally* in CFQ. The update > will happen in bfq_get_rq_private or cfq_set_request, on the arrival > of a new request. But, if the move happens right after the arrival of > a request, then all the scheduler functions executed until a new > request arrives for that entity will see a stale [b|c]fq_group. Much Limited staleness is fine. Especially in this case, it isn't too weird to claim that the order between the two operations isn't clearly defined. > worse, if also a blkcg_deactivate_policy or a blkg_destroy are > executed right after the move, then both the policy data pointed by > the [b|c]fq_group and the [b|c]fq_group itself may be deallocated. > So, all the functions of the scheduler invoked before next request > arrival may use dangling references! Hmm... but cfq_group is allocated along with blkcg and blkcg always ensures that there are no blkg left before freeing the pd area in blkcg_css_offline(). Thanks. -- tejun
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Paolo Valente <paolo.valente@linaro.org> - 2017-05-19 10:40 +0200
Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Jens Axboe <axboe@kernel.dk> - 2017-05-19 16:40 +0200
Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Paolo Valente <paolo.valente@linaro.org> - 2017-05-22 22:30 +0200
Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Tejun Heo <tj@kernel.org> - 2017-05-19 17:00 +0200
Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Paolo Valente <paolo.valente@linaro.org> - 2017-05-20 09:30 +0200
Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Tejun Heo <tj@kernel.org> - 2017-05-23 22:50 +0200
Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Paolo Valente <paolo.valente@linaro.org> - 2017-05-24 14:00 +0200
Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Paolo Valente <paolo.valente@linaro.org> - 2017-05-24 16:30 +0200
Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Tejun Heo <tj@kernel.org> - 2017-05-24 17:00 +0200
Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Tejun Heo <tj@kernel.org> - 2017-05-24 18:50 +0200
Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe Paolo Valente <paolo.valente@linaro.org> - 2017-05-24 18:50 +0200
csiph-web