免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1542 | 回复: 0
打印 上一主题 下一主题

[OpenBSD] Hibernation support added! [复制链接]

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-07-12 20:19 |只看该作者 |倒序浏览
本帖最后由 ulovko 于 2012-07-12 20:19 编辑

Contributed by jj on Thu Jul 12 10:06:43 2012 (GMT)
from the gentlemen-stop-your-engines dept.


Mike Larkin just committed support for hibernation on OpenBSD.
Only i386 using wd(4) disks at this moment, but still a big step forward.

On a recent posting on tech@, mlarkin@ sets up the rules for playing this game:
Hibernate support (suspend-to-disk) will be shortly enabled for i386 + wd
machines.

Some FAQs, before I commit the change to turn it on:

1. If you have anything other than i386 + wd, it won't work. Don't report it.
Other archs + disk types are being worked on now that i386 + wd is working.
This means, *FOR NOW*, it works on combinations like this:

wd0 at pciide0 channel 0 drive 0:

.. NOT this:

ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: msi, AHCI 1.2
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0:  SCSI3 0/direct



2. Hibernate writes to swap (at the end of your swap). If you have too small
a swap, it won't work, or if there are swap pages in use at the end of your
swap that overlap with what we want. You need at least "size of mem + 64MB"
of swap at the end of swap, free, at the time of hibernate.

3. We do *not* do encryption of the hibernated image, even if you have turned
on encrypted swap.

4. If you change your memory size/layout or change your kernel, we will detect
this and abort any hibernate resumes. The resume will be a normal boot then.

5. It will be very slow for the time being - this is a known problem that
I am working on fixing, but for now, we will wastefully write all memory,
even pages that are not in use. This will be fixed, so please don't report
that "it's slow". On my machine with 1.5GB ram, it takes a few minutes to write
everything out, and about 30s to read it back in on resume.

6. Hibernate can be triggered via 'ZZZ' in -current (capital 'Z's for hibernate,
lowercase 'z' for suspend).

7. Right now, there is no unwind support for errors. This means that just
about every failure case will result in a panic or reboot. This too is being
worked on.

If you have a supported (see #1) configuration and want to test it, let us
know if it works (or doesn't). There won't be a diff posted here, it will just
get enabled, probably sometime later tonight or tomorrow.

-ml

Of course finding other device types (like ahci(4)) and make them work without side-effects is a top priority now, to include more machines which can hibernate, as well as other architectures.

FROM: http://undeadly.org/cgi?action=article&sid=20120712101743
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP