Skip to contentSkip to conversation

ocfs2: a method to prevent lock on the blocked queue is starved.

RFC jiangyiwen 2 participants 2 messages Aug 27, 2015 – Sep 25, 2015 OCFS2

lore
Share & tools
lore

jiangyiwen

author
#0 lore raw

In dlm_shuffle_lists, if there are conversions still blocked on the converting queue all the time, the blocked locks on the blocked queue can never be processed, so the locks on the blocked queue will be starved.

So I have an idea to solve this problem: To switch the priority between the converting queue and blocked queue, i.e. process the locks on the blocked queue first. In this way, the lock on the blocked queue will be processed and it will not enter the blocked queue until the lockres is purged. so the scenario above will be solved.

Anyone has better ideas or advices?

Thanks,
Yiwen Jiang

#1 lore raw

Simply switch converting list and blocked list cannot resolve the starvation case fundamentally.
Maybe we have to set a deadline and bring in a scheduler strategy. @Junxiao, do you have any other idea?

Quoted 19 lines · jiangyiwen

In dlm_shuffle_lists, if there are conversions still blocked on the converting queue all the time, the blocked locks on the blocked queue can never be processed, so the locks on the blocked queue will be starved.

So I have an idea to solve this problem: To switch the priority between the converting queue and blocked queue, i.e. process the locks on the blocked queue first. In this way, the lock on the blocked queue will be processed and it will not enter the blocked queue until the lockres is purged. so the scenario above will be solved.

Anyone has better ideas or advices?

Thanks,
Yiwen Jiang

.