Skip to content

rq-qos memory barrier shenanigans

Josef Bacik linux-block 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 2 repliesIn review
  2. v24 patches 3 repliesSuperseded
  3. v12 patches 7 repliesSuperseded

Changes in v3 from the cover letter

- apparently I don't understand what READ/WRITE_ONCE does
- set ourselves to TASK_UNINTERRUPTIBLE on wakeup just in case
- add a comment about why we don't need a mb for the first data.token check which I'm sure Oleg will tell me is wrong and I'll have to send a v4

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5wait: add wq_has_single_sleeper helperinclude/linux/wait.h+13 -00 replies
2/5rq-qos: fix missed wake-ups in rq_qos_throttleblock/blk-rq-qos.c+1 -00 replies
3/5rq-qos: don't reset has_sleepers on spurious wakeupsblock/blk-rq-qos.c+1 -10 replies
4/5rq-qos: set ourself TASK_UNINTERRUPTIBLE after we scheduleblock/blk-rq-qos.c+1 -00 replies
5/5rq-qos: use a mb for got_tokenblock/blk-rq-qos.c+3 -00 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchOleg Nesterov
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH 0/5][v3] rq-qos memory barrier shenanigans

This is the patch series to address the hang we saw in production because of missed wakeups, and the other issues that Oleg noticed while reviewing the code.

v2->v3:
- apparently I don't understand what READ/WRITE_ONCE does
- set ourselves to TASK_UNINTERRUPTIBLE on wakeup just in case
- add a comment about why we don't need a mb for the first data.token check which I'm sure Oleg will tell me is wrong and I'll have to send a v4

v1->v2:
- rename wq_has_multiple_sleepers to wq_has_single_sleeper
- fix the check for has_sleepers in the missed wake-ups patch
- fix the barrier issues around got_token that Oleg noticed
- dropped the has_sleepers reset that Oleg noticed we didn't need

Thanks,

Josef