From owner-freebsd-acpi@FreeBSD.ORG Sun Jun 3 06:23:35 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68A85106564A; Sun, 3 Jun 2012 06:23:35 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id 1AAD08FC0C; Sun, 3 Jun 2012 06:23:34 +0000 (UTC) Received: from localhost (celeron.v4.locore.org [192.168.0.10]) by locore.org (8.14.5/8.14.5/iwasaki) with ESMTP/inet id q536NQ1N029701; Sun, 3 Jun 2012 15:23:26 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Sun, 03 Jun 2012 15:23:26 +0900 (JST) Message-Id: <20120603.152326.105529138.iwasaki@jp.FreeBSD.org> To: attilio@freebsd.org From: Mitsuru IWASAKI In-Reply-To: References: <20120603.002554.119853142.iwasaki@jp.FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: preparation for x86/acpica/acpi_wakeup.c X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 06:23:35 -0000 Hi, thanks for your comments. > I still didn't review your patch in detail, but I think PCB_SUSPENDING > is not really the way it should be done. > PCB datas are about the thread state on a particular CPU and the > suspension of the CPU has not much to do with the thread state. It > should be more a CPU state itself. This area is very weak in FreeBSD > right now, however, but I will try to dump my thinking on it right > now. > > The first thing to consider is that right now we only have 2 states > for CPUs: started and stopped. These states are controlled by > started_cpus and stopped_cpus masks respectively. It seems you really > want to add an intermediate level among the 2 where you have: started > -> suspended -> started -> suspended ... -> stopped and you need to > expand the mechanism for dealing with started and stopped cpus to do > that. I'm pretty sure this will be very helpful also for other > architectures that want to do the same. You are right, I'll add new global cpuset suspended_cpus and replace PCB_SUSPENDING with it. Thanks!