[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-commits-all
Subject:    Re: cvs commit: src/sys/geom/eli g_eli.c
From:       Pawel Jakub Dawidek <pjd () freebsd ! org>
Date:       2007-01-31 22:19:44
Message-ID: 20070131221944.GD487 () garage ! freebsd ! pl
[Download RAW message or body]


On Wed, Jan 31, 2007 at 01:08:14PM -0500, John Baldwin wrote:
> [...] 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.

As a consumer of such functionality I'd like something like this:

- I'd like to register myself as interested in receiving "CPU-online"
  and "CPU-offline" events. The EVENTHANDLER(9) KPI seems to be ok.
  When my registration is from a kernel module (all CPUs are already
  online), I'd like to still receive a fake CPU-online event for all of
  them.

- When my CPU-online handler is called, I'd like to start my thread from
  there and be sure that CPU won't go offline before I return from the
  handler. It will be nice to be able to specify CPU ID I want to bind
  to in kthread_create(). This would save me from the
  kthread_create-sleep-wakeup dance.

- When someone asks for a CPU to go offline, all CPU-offline handlers
  are called one by one and CPU will work (and stay online) until the
  last handler returns.

- It'll be nice to get an error in return from sched_bind() return if
  CPU is going offline or is already offline.

- Would be nice if there will be no need for the consumers to handle the
  boot CPU somehow specially.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic