/* p_{j} = x_{j} / (period/2 + t % period/2)  */
void prop_fraction_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl, long *numerator, long *denominator)
/* p_{j} = x_{j} / (period/2 + t % period/2)  */
void prop_fraction_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl, long *numerator, long *denominator)
{
	struct prop_global *pg = prop_get_global(pd);
	unsigned long period_2 = 1UL << (pg->shift - 1);
	unsigned long counter_mask = period_2 - 1;
	unsigned long global_count;
	prop_norm_percpu(pg, pl);
	*numerator = percpu_counter_read_positive(&pl->events);
	global_count = percpu_counter_read(&pg->events);
	*denominator = period_2 + (global_count & counter_mask);
	prop_put_global(pd, pg);
}