From: Jeremy Kerr <jk@ozlabs.org>
To: <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org, hch@lst.de
Subject: [PATCH] spufs: don't yield nosched context
Date: Tue, 05 Jun 2007 09:25:59 +0800 [thread overview]
Message-ID: <1181006759.895317.924309156325.qpush@pokey> (raw)
From: Christoph Hellwig <hch@lst.de>
Nosched context sould never be scheduled out, thus we must not
deactivate them in spu_yield ever.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
Paulus - this is also a contender for 2.6.22 bugfixes.
---
arch/powerpc/platforms/cell/spufs/sched.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/sched.c
===================================================================
--- linux-2.6-spufs.orig/arch/powerpc/platforms/cell/spufs/sched.c
+++ linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/sched.c
@@ -430,9 +430,11 @@ void spu_deactivate(struct spu_context *
*/
void spu_yield(struct spu_context *ctx)
{
- mutex_lock(&ctx->state_mutex);
- __spu_deactivate(ctx, 0, MAX_PRIO);
- mutex_unlock(&ctx->state_mutex);
+ if (!(ctx->flags & SPU_CREATE_NOSCHED)) {
+ mutex_lock(&ctx->state_mutex);
+ __spu_deactivate(ctx, 0, MAX_PRIO);
+ mutex_unlock(&ctx->state_mutex);
+ }
}
void spu_sched_tick(struct work_struct *work)
reply other threads:[~2007-06-05 1:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1181006759.895317.924309156325.qpush@pokey \
--to=jk@ozlabs.org \
--cc=cbe-oss-dev@ozlabs.org \
--cc=hch@lst.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox