summaryrefslogtreecommitdiffstats
path: root/lib/zlib_deflate
diff options
context:
space:
mode:
authorJan Schmidt <list.btrfs@jan-o-sch.net>2012-06-27 15:05:48 +0200
committerJan Schmidt <list.btrfs@jan-o-sch.net>2012-06-27 16:34:35 +0200
commit8ca78f3eda4bf1799e8c4ba02035623fd7a347df (patch)
tree7d4ae8520273276213d1e02921b3eb338fc6a6f4 /lib/zlib_deflate
parentcb77fcd88569cd2b7b25ecd4086ea932a53be9b3 (diff)
Btrfs: avoid waiting for delayed refs when we must not
We track two conditions to decide if we should sleep while waiting for more delayed refs, the number of delayed refs (num_refs) and the first entry in the list of blockers (first_seq). When we suspect staleness, we save num_refs and do one more cycle. If nothing changes, we then save first_seq for later comparison and do wait_event. We ought to save first_seq the very same moment we're saving num_refs. Otherwise we cannot be sure that nothing has changed and we might start waiting when we shouldn't, which could lead to starvation. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Diffstat (limited to 'lib/zlib_deflate')
0 files changed, 0 insertions, 0 deletions