[PC-BSD Testing] PC-BSD 8.1 RC1 - thoughts and ideas

M. Warner Losh imp at bsdimp.com
Wed Jul 7 08:10:22 PDT 2010


In message: <AANLkTikaPEJWO2vK-tBUrxBU8rDjob2A5dxZSJovtYua at mail.gmail.com>
            Mike Bybee <mbybee at dometrilogy.com> writes:
: On Wed, Jul 7, 2010 at 7:50 AM, M. Warner Losh <imp at bsdimp.com> wrote:
: 
: > In message: <4C348239.7030704 at pcbsd.org>
: >            Kris Moore <kris at pcbsd.org> writes:
: > : On 07/07/2010 09:24, Mike Bybee wrote:
: > : >
: > : >
: > : >
: > : > I would love to step up and help on the suspend resume and power
: > : > management if you can point me in the right direction.
: > : >
: > : > --
: > : > Thanks,
: > : > Mike Bybee
: > : >
: > :
: > : Sure!
: > :
: > : The first thing to do is get yourself subscribed to the freebsd-acpi
: > : list:
: > :
: > : http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
: > :
: > : That's where you can discuss all things acpi/power management.
: > :
: > : Next I would e-mail Alexander Motin (mav at freebsd.org). He's been doing
: > : some work for us, and knows a lot about the acpi subsystem, and can
: > : probably point you in the right direction. He also wrote this nice
: > : guide on tuning power consumption which may help you:
: > :
: > : http://wiki.freebsd.org/TuningPowerConsumption
: >
: > The biggest problem with suspend/resume today is that most laptops are
: > multicore, but the suspend/resume code doesn't know about that.  We
: > need to go in and stop all the other CPUs before starting to traverse
: > the device tree suspending the devices.  Once we have *that* in place,
: > it becomes a battle of attrition to fix and drivers that might be
: > broken.
: >
: > The suspend/resume code can be found in src/sys/dev/acpica/acpi.c
: > acpi_EnterSleepState.  While there's some SMP code to pin the thread
: > to CPU 0, there's no code to shut off all the other CPUs' scheduling.
: >
: > The other big ticket item here is the S3 state.  S3BIOS has been
: > supported for years.  However, support for the S3 state without BIOS
: > intervention has languished.  Writing the dump files is relatively
: > straight forward, once you've quiesced the rest of the system, but the
: > boot path requires boot loader support, which we don't have.
: >
: > Warner
: > _______________________________________________
: > Testing mailing list
: > Testing at lists.pcbsd.org
: > http://lists.pcbsd.org/mailman/listinfo/testing
: >
: >
: 
: Is that why it's fairly solid on the Linux 2.6 kernel with Grub 2 (like
: Ubuntu 10.4, as an example), but so unstable on FreeBSD?

Possibly.

: Is there any BSD that *has* a working suspend/resume that we can perhaps use
: as a code model?

NetBSD's suspend/resume is better in regard to CPU spinning down.
However, it is fairly specific to the scheduler in their kernel.  They
do not yet have the S3OS state implemented, so we can't crib from
them.

A good kernel hacker could likely complete this support in about a
month of full-time work.

Warner



More information about the Testing mailing list