cfq-iosched:questions about cfqqs' fairness

From: shifei ge
Date: Fri Oct 16 2015 - 07:23:12 EST


hello everyone,

i have some questions about cfq,could you give me some help?thanks!

codes:
cfq_service_tree_add:rb_key = cfq_slice_offset(cfqd, cfqq) + jiffies;

my questions as blew:

1,why use max_slice - cfqq_slice to dertermine offset in service tree, how the offset guarantee cfqqs' fairness whithin the servicetree?

2,why we add jiffies?

thanks again.