OpenBSD amd64默认支持大内存

OpenBSD的安装、升级、更新等日常问题。

版主: chenjun天地乾坤

回复
头像
lionux
锌 Zn
帖子: 457
注册时间: 2010-02-04 11:09

OpenBSD amd64默认支持大内存

帖子 lionux » 2011-04-14 19:51

http://undeadly.org/cgi?action=article& ... 0413140750
Bigmem enabled on amd64
Contributed by jj on Wed Apr 13 11:19:51 2011 (GMT)
from the half-meg-half-gig-half-tera dept.

Since this commit:

代码: 全选

CVSROOT:    /cvs
    Module name:    src
    Changes by:    beck@cvs.openbsd.org    2011/04/02 11:36:45
 
    Modified files:
        sys/arch/amd64/amd64: machdep.c 
 
    Log message:
    Enable bigmem by default on amd64.
    ok deraadt@

amd64 machines may now use more than 4G of ram.

Given the fact that amd64 machines commonly have more than 4G (or rather the 3.5G you end up getting usable after everything else has been deducted) nowadays, this is really good news.

It has required some changes to the buffer cache in order for it to only pick memory in the low 4G range for I/O buffers, and similar changes to various other device drivers, but apart from that, it is ready for testing by you!

I took a few of my local amd64 machines for a spin and they all ran as expected so I decided to take a box at work for a quick run. It got stuck here for a long while before continuing on to this dmesg.

The whole installation went fine, with a record comp49.tgz unpack in 7 seconds (probably attributed to the fast disks more than the memory) but unfortunately, the final installation when booted with all 64 cores and 512G memory enabled left me with these crashes.

I don't have access to the box anymore, so I couldn't test with a bunch of cores (or HT) disabled, but at least the whole installation (which does run in single-processor mode) went through, so there's definitely hope even for big boxes. I have no idea how OpenBSD scales, but if anyone buys me another one of these lovely Dell 910 boxes, I'll surely find out.

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: amd64默认支持大内存

帖子 leo » 2011-04-14 21:32

人家只说了支持4G以上,但绝没有“说”支持提问者的64核的CPU和400G以上的内存,所以作者被干掉了。:D;我怎么没有这样的机器?—— 即使有估计噪音也快赶上跑车了,玩笑,默认支持大内存了不管怎样说也是个好消息。

此外如果你最近想为了让系统支持大内存而升级到当前要小心,因为邮件列表里有这么一段:
>
(4) grub started fine, and Windows XP boots fine, but when I try to
boot OpenBSD, I get something like this:
Loading...
probing: <<additional details>>
disk: fd0 hd0+*
>> OpenBSD/i386 BOOT 2.13
open(hd0a:/etc/boot.conf): Invalid argument
boot>
booting hd0a:/bsd: open hd0a:/bsd: Invalid argument
failed(22). will try ...
And OpenBSD never boots. I don't recall changing anything else. From
what I know (very little), biosboot was able to load the 2nd stage
bootloader, but it now failed loading the kernel image.

What surprises me is OpenBSD booted fine *before* I had Windows XP,
and the ~143G partition was still present. Possibly something else is
broken...
Nope. We introduced a hard limit of 128GB as the workable lowest common
denominator while we research a reliable way to determine when it is
safe to go beyond. On one of my recent machines, just to pick an example,
the BIOS simply returns all zero's for all I/O attempted past 128GB.

We do like to impose draconian new restrictions and debug code early
in a release cycle. :-)

The lack of a reliable way to safely go beyond 128GB, even with recent
BIOSen is sad and no doubt the reason Windows wants the first 100MB or
so for its boot, OpenSUSE 11.4 blew up when installed >128GB on a
just purchased motherboard, etc.

The second target for anyone with a time machine should be the morons
who decided BIOS would be enough for anyone.

>
> "makeactive" in menu.lst for grub did not help either (as I had guessed).
>
> -Amarendra
> [...]
>

All grub can do (to my knowledge) is grab and run the OpenBSD /boot
program. And if it doesn't work ...

.... Ken
好像是最近(leo:具体时间我不确定,但是肯定是最近的事情,以前没有这个问题)开发者将snapshot的 /boot的位置限制在128G以内,直到稳定后才修改。如果你是多操作系统共用同一块磁盘,而且OpenBSD分区在128G之外则会不能启动,晕!我就是多操作系统,而且第一个基本分区就是200G的win7,:eek: —— 这里请大家注意。别中招。估计这里的玩家大部分都是多操作系统的。:D
所以对我来说,目前还是直接修改 machdep.c 来的保险。

或者before you reboot,按照邮件列表里的解决方法
You need to compile 'and friends', in particular a new /boot. And
install it. This is done by

cd /usr/src/sys/arch/[1386|amd64]/stand
make clean
make obj
make
make install
/usr/mdec/installboot -v /boot /usr/mdec/biosboot

all as root of course.
你也许编译不过去,不过没有关系,直接运行如下命令也可解决,例如我的磁盘是sd0:

代码: 全选

# /usr/mdec/installboot -v /boot /usr/mdec/biosboot sd0
效果如图:
图片

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

follow current you need

帖子 leo » 2011-04-15 6:43

2011/03/13 - -current mklocale required
mklocale needs to be built and installed to avoid a "conflicting map entries" error:

代码: 全选

cd /usr/src/usr.bin/mklocale
make obj
make depend
make
make install
=================================
一天了,userland死活编译不过去,说是更新的文件比原来的文件还旧,老让检查timezone设置,我觉得在这里没有设置错误。—— 糊涂了,编译当前必须先安装snapshots再升级,可是目前的这个snapshots肯定是要安装在磁盘的前128G的,彻底晕菜,放弃,等4.9发行版看看带不带此特性,估计够呛,离4.9的发布只有两周了,光盘早就寄出去了。

===============================================================
终于成功编译了userland, 原因是原来的时区设置有误,重新设置后需要重新启动一下系统。

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 36 访客