Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1239452

Re: [PATCH 1/4] sched/fair: Generalize the load/util averages resolution definition

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] sched/fair: Generalize the load/util averages resolution definition
Date 2015-10-05 13:00 +0200
Message-ID <qgbES-56q-19@gated-at.bofh.it> (permalink)
References <qg34B-187-1@gated-at.bofh.it> <qg34C-187-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Oct 05, 2015 at 01:56:56AM +0800, Yuyang Du wrote:
> Metric needs certain resolution to allow detail we can look into,
> which also determines the range of the metric.
> 
> For instance, increasing the resolution of [0, 1] (two levels), one
> can multiply 1024 and get [0..1024] (1025 levels).
> 

>  /*
> + * Integer metrics need certain resolution to allow how much detail we
> + * can look into, e.g., load, load_avg, util_avg, freq, and capacity.
> + * We define a basic resolution constant number, and then formalize
> + * all these metrics based on that basic resolution.
> + */
> +# define SCHED_RESOLUTION_SHIFT	10
> +# define SCHED_RESOLUTION_SCALE	(1L << SCHED_RESOLUTION_SHIFT)
> +
> +/*

I find all that most confusing, maybe just refer to fixed point
arithmetic, that's a well defined and well understood concept.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] sched/fair: Clean up sched metric definitions Yuyang Du <yuyang.du@intel.com> - 2015-10-05 03:50 +0200
  [PATCH 4/4] sched/fair: Rename scale_load() and scale_load_down() Yuyang Du <yuyang.du@intel.com> - 2015-10-05 03:50 +0200
  [PATCH 1/4] sched/fair: Generalize the load/util averages resolution definition Yuyang Du <yuyang.du@intel.com> - 2015-10-05 03:50 +0200
    Re: [PATCH 1/4] sched/fair: Generalize the load/util averages  resolution definition Ingo Molnar <mingo@kernel.org> - 2015-10-05 09:10 +0200
    Re: [PATCH 1/4] sched/fair: Generalize the load/util averages  resolution definition Peter Zijlstra <peterz@infradead.org> - 2015-10-05 13:00 +0200
  [PATCH 2/4] sched/fair: Remove SCHED_LOAD_SHIFT and SCHED_LOAD_SCALE Yuyang Du <yuyang.du@intel.com> - 2015-10-05 03:50 +0200
  [PATCH 3/4] sched/fair: Remove scale_load_down() for load_avg Yuyang Du <yuyang.du@intel.com> - 2015-10-05 03:50 +0200

csiph-web