/* Scale schedule slice based on io priority. Use the sync time slice only if a queue is marked sync and has sync io queued. A sync queue with async io only, should not get full sync slice length.  */
static int cfq_prio_slice(struct cfq_data *cfqd, bool sync, unsigned short prio)
/* Scale schedule slice based on io priority. Use the sync time slice only if a queue is marked sync and has sync io queued. A sync queue with async io only, should not get full sync slice length.  */
static int cfq_prio_slice(struct cfq_data *cfqd, bool sync, unsigned short prio)
{
	const int base_slice = cfqd->cfq_slice[sync];
	WARN_ON(prio >= IOPRIO_BE_NR);
	return base_slice + (base_slice/CFQ_SLICE_SCALE * (4 - prio));
}