At 05:08 PM 5/1/2005, Blaisorblade wrote:
On Friday 29 April 2005 11:59, Suresh wrote:
> Hi
>
> I am running uml with smp support.
> I created 4 threads through kernel_thread.
> I want to run the each thread on a different particular processor.
> I have in the thread I have set currnet->cpus_allowed = to the cpu on which
> it is allowed.
Is this an allowed API? I.e., I don't think that you're allowed to set that so
simply. In fact, this is what I get on a 2.6.12-rc3 tree.


$ grep cpus_allowed include/linux/sched.h
        cpumask_t cpus_allowed;
extern int set_cpus_allowed(task_t *p, cpumask_t new_mask);
static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask)

I haven't seen any API for that.

Satisfied? Grep is always your friend...

Thanks, I missed to set the cpus_runnable to the cpus_allowed. This indeed helped.

> Some how I seem to run only on cpu1.
How did you verify this? Also, I guess you really mean cpu0 (the first cpu).


I verified by printing smp_processor_id. Any way, I found the problem,
and now it is working.
Thanks for that.

> Kindly tell me why is that??
> regards,
>
> Suresh
Hmm, Jeff said that at least interrupts only run on cpu0... however, I won't
consider this as a real UML bug unless using the correct API does not provide
the expected results.
--
Paolo Giarrusso, aka Blaisorblade
Skype user "PaoloGiarrusso"
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade




------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ User-mode-linux-user mailing list User-mode-linux-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user





------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ User-mode-linux-user mailing list User-mode-linux-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to