Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2007 15:32:28 -0800
From:      Nate Lawson <nate@root.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Scott Long <scottl@samsco.org>, src-committers@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>, cvs-src@freebsd.org, cvs-all@freebsd.org, arch@freebsd.org
Subject:   Re: cvs commit: src/sys/geom/eli g_eli.c
Message-ID:  <45C1270C.1050308@root.org>
In-Reply-To: <200701311308.16810.jhb@freebsd.org>
References:  <20070128202917.5B67916A5A6@hub.freebsd.org> <200701301636.38175.jhb@freebsd.org> <20070130233238.GB94650@garage.freebsd.pl> <200701311308.16810.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> I wouldn't sell yourself so short actually. :)  You're probably more competent 
> than you think.  I'm not really an expert on SMP or schedulers either (I've 
> not had any formal training, and if you were to review some of my earlier SMP 
> stuff it shows), but ended up working on it because it needed to be done.  
> Most of what I've learned is by just working on stuff.  Anyways, maybe this 
> issue will bubble up to someone's todo list at BSDCan to settle how to handle 
> CPU's arriving and departing.  One big thing that worries me is how to handle 
> pinned and bound threads when a CPU goes away.  Also, it may be more useful 
> to think of CPUs not as just present/not present, but more in terms of:
> 
> - not present
> - present but offline
> - present and online
> 
> And most code would really only care about offline/online events.  We could 
> maybe allow pinned and bound threads to still run on an offline CPU (and the 
> idlethread for that CPU of course) but require that there be no pinned bound 
> threads to completely detach a CPU (in the case of systems with removable 
> CPUs).  It would be useful to at least handle taking CPUs offline and then 
> back online though.

I think this is a good design, assuming that all code that creates a 
thread and pins it are forced to register to receive events.  That way 
you don't end up with a thread pinned and blocking the CPU going away.

This capability will also be useful for suspend/resume on SMP since we 
need to stop CPUs and then restart them after resume.

-- 
Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45C1270C.1050308>