public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Antonio Vargas <wind@cocodriloo.com>
Cc: linux-kernel@vger.kernel.org, Robert Love <rml@tech9.net>
Subject: Re: fairsched + O(1) process scheduler
Date: Wed, 2 Apr 2003 08:35:12 -0800	[thread overview]
Message-ID: <20030402163512.GC993@holomorphy.com> (raw)
In-Reply-To: <20030402124643.GA13168@wind.cocodriloo.com>

On Wed, Apr 02, 2003 at 02:46:43PM +0200, Antonio Vargas wrote:
+static inline void update_user_timeslices(void)
...
+	list_for_each(entry, &user_list) {
+		user = list_entry(entry, struct user_struct, uid_list);
+
+		if(!user) continue;
+
+		if(0){
+			user_time_slice = user->time_slice;

Hmm, this looks very O(n)... BTW, doesn't uidhash_lock lock user_list?


On Wed, Apr 02, 2003 at 02:46:43PM +0200, Antonio Vargas wrote:
> @@ -39,10 +42,12 @@ struct user_struct root_user = {
>  static inline void uid_hash_insert(struct user_struct *up, struct list_head *hashent)
>  {
>  	list_add(&up->uidhash_list, hashent);
> +	list_add(&up->uid_list, &user_list);
>  }

Okay, there are three or four problems:

(1) uidhash_lock can't be taken in interrupt context
(2) you aren't taking uidhash_lock at all in update_user_timeslices()
(3) you're not actually handing out user timeslices due to an if (0)
(4) walking user_list is O(n)


-- wli

  reply	other threads:[~2003-04-02 16:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-01 12:51 fairsched + O(1) process scheduler Antonio Vargas
2003-04-01 16:41 ` William Lee Irwin III
2003-04-01 22:19   ` Antonio Vargas
2003-04-02 12:46     ` Antonio Vargas
2003-04-02 16:35       ` William Lee Irwin III [this message]
2003-04-02 21:36         ` Antonio Vargas
2003-04-02 21:35           ` Robert Love
2003-04-02 22:07             ` Antonio Vargas
2003-04-02 22:10               ` Robert Love
2003-04-02 22:35                 ` Antonio Vargas
2003-04-03 17:15                 ` Corey Minyard
2003-04-03 18:17                   ` Robert Love
     [not found]     ` <200304021144.21924.frankeh@watson.ibm.com>
2003-04-03 12:53       ` Antonio Vargas
2003-04-03 19:22         ` William Lee Irwin III
2003-04-04 11:27           ` Antonio Vargas
2003-04-04 14:04             ` William Lee Irwin III
2003-04-04 20:12               ` Antonio Vargas
2003-04-04 20:40                 ` William Lee Irwin III
     [not found]             ` <200304041453.16630.frankeh@watson.ibm.com>
2003-04-04 21:36               ` Antonio Vargas
     [not found]                 ` <200304081456.34367.frankeh@watson.ibm.com>
2003-04-08 20:19                   ` Antonio Vargas
2003-04-01 18:33 ` Robert Love

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=20030402163512.GC993@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=wind@cocodriloo.com \
    /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