]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] spusched: Fix initial timeslice calculation
authorChristoph Hellwig <hch@lst.de>
Wed, 25 Jul 2007 11:31:09 +0000 (21:31 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 26 Jul 2007 06:17:56 +0000 (16:17 +1000)
commitc71ebd200912d0730c40155583a782a5304c6119
tree5c585a6e5500b943301e0a30a31b432c08bb9b65
parent70f033560a3a7f3d57c2aba135a97a3b4a835020
[POWERPC] spusched: Fix initial timeslice calculation

Currently we calculate the first timeslice for every context
incorrectly - alloc_spu_context calls spu_set_timeslice before we set
ctx->prio so we always calculate the longest possible timeslice for the
lowest possible priority.

This patch makes sure to update the schedule-related fields before
calculating the timeslice and also makes sure we update the timeslice for
a non-running context when entering spu_run so a priority change affects
the context as soon as possible.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/spufs/context.c
arch/powerpc/platforms/cell/spufs/run.c