lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <46A769C2.6030701@felicis.org>
Date:	Wed, 25 Jul 2007 17:18:26 +0200
From:	Martin Roehricht <ml@...icis.org>
To:	linux-kernel@...r.kernel.org
CC:	mingo@...e.hu
Subject: Re: highest and lowest priority job of a runqueue

On 07/25/2007 11:50 AM, Martin Roehricht wrote:
> I thought I might use (given a list with tmp pointers to all CPUs)
> 	rq = cpu_rq(tmp->cpu);
> 	task_load = rq->curr->load_weight;
> but this always returns 128 regardless of the fact if a task currently
> runs on that CPU or not. I guess it returns the load of the migration
> thread, but I'm not sure. I would like to migrate specific tasks
> throughout find_busiest_group().

Okay, I think I found that my assumption should be just fine and I had 
trouble with some debugging output via the show_schedstat() function.
The "rq->curr->load_weight" returns what it is supposed to return. :-)

I am still uncertain on how to resolve the specific highest or lowest 
priority job:
> I was wondering how I may retrieve
> (a) the priority/load of the highest and the lowest priority task of a
>     runqueue (in a multiprocessor system), and
> (b) the corresponding pointer to this task?

I will try something of the form (pseudocode like):

int idx;
struct list_head *head;
struct task_struct *task;

idx = sched_find_first_bit(rq->active->bitmap);
head = array->queue + idx;
task = list_entry(head, struct task_struct, run_list);

For the lowest priority task a function like "sched_find_last_bit()" 
might be useful.
Would this be a good way to succeed?

> Furthermore, is it correct, that the current migration strategy
> (move_tasks()) chooses automatically the highest priority task?

Thanks,
Martin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ