Stephan Baerwolf
db670dac49
sched: Fix and optimise calculation of the weight-inverse
...
If the inverse loadweight should be zero, function "calc_delta_mine"
calculates the inverse of "lw->weight" (in 32bit integer ops).
This calculation is actually a little bit impure (because it is
inverting something around "lw-weight"+1), especially when
"lw->weight" becomes smaller.
The correct inverse would be 1/lw->weight multiplied by
"WMULT_CONST" for fixcomma-scaling it into integers.
(So WMULT_CONST/lw->weight ...)
The old, impure algorithm took two divisions for inverting lw->weight,
the new, more exact one only takes one and an additional unlikely-if.
Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de >
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Link: http://lkml.kernel.org/n/tip-0pz0wnyalr4tk4ln11xwumdx@git.kernel.org
[ This could explain some aritmetical issues for small shares but nothing
concrete has been reported yet so we are not confident enough to queue
this up in sched/urgent and for -stable backport. But if anyone finds
this commit and sees it to fix some badness then we can certainly
change our mind! ]
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2011-05-16 11:01:18 +02:00
..
2011-03-31 11:26:23 -03:00
2011-03-20 18:14:55 -07:00
2011-05-02 21:16:37 +02:00
2011-04-18 23:58:59 +02:00
2011-04-18 10:39:38 +02:00
2011-05-12 09:36:18 +02:00
2010-08-09 16:48:42 -04:00
2010-07-14 11:29:46 +02:00
2011-03-31 11:26:23 -03:00
2011-03-14 09:15:23 -04:00
2011-03-03 10:55:40 -08:00
2010-10-30 01:42:19 -04:00
2011-03-03 10:55:40 -08:00
2011-03-31 11:26:23 -03:00
2011-03-23 19:46:28 -07:00
2011-03-23 19:47:06 -07:00
2010-10-27 18:03:08 -07:00
2011-03-31 11:26:23 -03:00
2011-02-02 15:28:19 +01:00
2010-10-15 15:53:27 +02:00
2011-03-31 11:26:23 -03:00
2011-04-11 14:09:32 +02:00
2011-03-23 19:47:19 -07:00
2011-03-23 19:47:02 -07:00
2010-03-06 11:26:46 -08:00
2010-08-09 20:45:05 -07:00
2011-04-25 17:28:24 +02:00
2011-05-12 09:36:37 +02:00
2010-12-24 15:02:40 +01:00
2011-03-23 19:47:08 -07:00
2011-04-15 16:34:32 +02:00
2011-03-23 19:47:08 -07:00
2011-04-29 10:57:11 +02:00
2010-08-17 09:11:52 +02:00
2010-12-16 11:36:43 +01:00
2010-12-18 15:54:48 +01:00
2010-10-29 12:56:13 -04:00
2011-03-25 17:52:22 -07:00
2011-04-20 00:36:11 +02:00
2010-10-01 10:50:58 -07:00
2010-08-17 18:07:43 -07:00
2011-01-07 17:02:58 -08:00
2010-05-21 09:37:31 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2010-05-04 05:38:16 +02:00
2011-03-23 13:54:47 +01:00
2011-03-31 11:26:23 -03:00
2011-03-23 19:47:19 -07:00
2011-03-31 11:26:23 -03:00
2011-04-14 08:52:33 +02:00
2011-04-14 08:52:33 +02:00
2011-04-24 13:18:38 +02:00
2011-04-14 08:52:33 +02:00
2010-02-25 10:34:26 +01:00
2010-10-27 18:03:09 -07:00
2011-03-23 19:47:08 -07:00
2011-03-31 11:26:23 -03:00
2011-03-22 17:44:11 -07:00
2011-03-31 11:26:23 -03:00
2011-04-11 11:07:55 +02:00
2011-03-23 19:46:58 -07:00
2011-04-18 10:35:30 -07:00
2011-03-15 00:43:18 +01:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-22 17:44:13 -07:00
2010-10-15 15:53:27 +02:00
2011-04-25 17:28:24 +02:00
2010-11-12 07:55:31 -08:00
2011-03-04 08:05:41 -08:00
2011-03-04 08:05:08 -08:00
2011-01-14 04:58:08 -08:00
2011-03-04 08:05:17 -08:00
2010-12-17 12:34:08 -08:00
2010-11-29 22:01:58 -08:00
2011-01-07 17:02:58 -08:00
2010-12-17 12:34:20 -08:00
2010-11-05 08:21:34 -07:00
2011-03-23 19:46:22 -07:00
2010-12-17 10:01:09 -08:00
2011-01-27 21:13:51 -05:00
2011-01-27 21:13:51 -05:00
2011-02-22 22:07:22 +01:00
2011-01-27 21:13:51 -05:00
2011-03-31 11:26:23 -03:00
2011-02-23 11:33:59 +01:00
2010-11-23 10:29:08 +01:00
2010-07-17 12:06:22 +02:00
2010-07-17 12:06:22 +02:00
2011-04-24 13:18:38 +02:00
2011-05-04 09:07:21 +02:00
2011-04-14 08:52:41 +02:00
2011-04-14 08:52:36 +02:00
2011-05-16 11:01:17 +02:00
2010-10-24 13:29:01 +02:00
2011-04-14 08:52:36 +02:00
2011-05-16 11:01:18 +02:00
2011-04-08 11:05:24 -07:00
2011-03-22 17:44:11 -07:00
2011-03-31 11:26:23 -03:00
2009-12-14 23:55:33 +01:00
2011-01-14 04:56:49 -08:00
2011-03-22 17:44:01 -07:00
2011-03-15 02:21:44 -04:00
2011-03-23 19:47:06 -07:00
2011-03-14 09:15:28 -04:00
2011-03-23 19:46:51 -07:00
2011-03-23 19:46:54 -07:00
2011-03-23 19:47:14 -07:00
2010-10-14 08:55:27 +02:00
2011-03-15 18:53:35 -07:00
2011-03-15 18:53:35 -07:00
2011-02-03 09:28:46 -05:00
2010-10-27 18:03:17 -07:00
2011-03-23 19:47:08 -07:00
2011-01-13 08:03:18 -08:00
2011-03-31 11:26:23 -03:00
2011-03-23 19:46:59 -07:00
2011-03-23 19:47:03 -07:00
2011-03-31 11:26:23 -03:00
2011-04-28 11:28:21 -07:00
2010-06-29 10:07:14 +02:00
2011-04-29 18:08:37 +02:00