public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] O(1) scheduler unlock_task_rq
Date: 20 Jan 2002 18:50:52 -0500	[thread overview]
Message-ID: <1011570657.850.362.camel@phantasy> (raw)
In-Reply-To: <1011569639.850.354.camel@phantasy>
In-Reply-To: <1011569639.850.354.camel@phantasy>

[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

In Ingo's new O(1) scheduler, unlock_task_rq takes a pointless argument
(task_t * p).

This patch, against 2.5.3-pre2 + J2, removes the argument and fixes all
known uses of the function.

	Robert Love

[-- Attachment #2: sched-fixes-2.5.3-pre2-J2.patch --]
[-- Type: text/plain, Size: 1352 bytes --]

--- linux-2.5.3-pre2-ingo-J2/kernel/sched.c	Sun Jan 20 18:35:58 2002
+++ linux/kernel/sched.c	Sun Jan 20 18:36:59 2002
@@ -70,11 +70,11 @@
 	return __rq;
 }
 
-static inline void unlock_task_rq(runqueue_t *rq, task_t *p,
-							unsigned long *flags)
+static inline void unlock_task_rq(runqueue_t *rq, unsigned long *flags)
 {
 	spin_unlock_irqrestore(&rq->lock, *flags);
 }
+
 /*
  * Adding/removing a task to/from a priority array:
  */
@@ -202,10 +202,10 @@
 	}
 	rq = lock_task_rq(p, &flags);
 	if (unlikely(rq->curr == p)) {
-		unlock_task_rq(rq, p, &flags);
+		unlock_task_rq(rq, &flags);
 		goto repeat;
 	}
-	unlock_task_rq(rq, p, &flags);
+	unlock_task_rq(rq, &flags);
 }
 
 /*
@@ -260,7 +260,7 @@
 			resched_task(rq->curr);
 		success = 1;
 	}
-	unlock_task_rq(rq, p, &flags);
+	unlock_task_rq(rq, &flags);
 	return success;
 }
 
@@ -639,7 +639,6 @@
 	spin_unlock_irq(&rq->lock);
 
 	reacquire_kernel_lock(current);
-	return;
 }
 
 /*
@@ -846,7 +845,7 @@
 			resched_task(rq->curr);
 	}
 out_unlock:
-	unlock_task_rq(rq, p, &flags);
+	unlock_task_rq(rq, &flags);
 }
 
 #ifndef __alpha__
@@ -966,7 +965,7 @@
 		activate_task(p, task_rq(p));
 
 out_unlock:
-	unlock_task_rq(rq, p, &flags);
+	unlock_task_rq(rq, &flags);
 out_unlock_tasklist:
 	read_unlock_irq(&tasklist_lock);
 

       reply	other threads:[~2002-01-20 23:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1011569639.850.354.camel@phantasy>
2002-01-20 23:50 ` Robert Love [this message]
2002-01-21 11:29   ` [PATCH] O(1) scheduler unlock_task_rq Ingo Molnar

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=1011570657.850.362.camel@phantasy \
    --to=rml@tech9.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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