NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/40419 (processor sets broken on 5.99.6)



On Wed, Jan 21, 2009 at 12:01:49AM +0000, Mindaugas Rasiukevicius wrote:

> Andrew Doran <ad%netbsd.org@localhost> wrote:
> > > We can do yield() in sys__pset_bind(). Do you think it is worth?
> > 
> > I was thinking of a function that scans all threads, with cpu_lock held, and
> > checks to see if their l_cpu is allowed by their affinity mask, processor
> > set or LP_BOUND flag. If not, change l_cpu (or migrate if online), then do a
> > broadcast xcall to nullop() if there have been migrations.
> 
> After some thinking, I do not think it is worth. Theoretically, xc_broadcast
> might still not ensure that all LWPs have migrated, eg. in a case when there
> are many migrating LWPs in the same run-queue.

Hmm. I can't look at the code right now. If we can have LWPs in the wrong
runqueue after a pset/affinity change, we should move them to prevent them
running on that CPU after there is a context switch. Maybe it would be
useful to add a syncobj_t::sobj_changecpu()?

Thanks,
Andrew


Home | Main Index | Thread Index | Old Index