/* calculate the y-projection of the runtime service curve by the given x-projection value  */
static u64 rtsc_y2x(struct runtime_sc *rtsc, u64 y)
/* calculate the y-projection of the runtime service curve by the given x-projection value  */
static u64 rtsc_y2x(struct runtime_sc *rtsc, u64 y)
{
	u64 x;
	if (y < rtsc->y)
		x = rtsc->x;
	else if (y <= rtsc->y + rtsc->dy) {
		if (rtsc->dy == 0)
			x = rtsc->x + rtsc->dx;
		else
			x = rtsc->x + seg_y2x(y - rtsc->y, rtsc->ism1);
	} else {
		x = rtsc->x + rtsc->dx
		    + seg_y2x(y - rtsc->y - rtsc->dy, rtsc->ism2);
	}
	return x;
}