FreeBSD
OpenJDK on FreeBSD
Maho今天正式commit了 OpenJDK 的port,表面上看这是一小步,但在我看来这却是一项历史性的进步,因为终于可以不再受到之前那个 click-through 许可证的限制了(也就是说,可以几乎没有任何限制地随光盘,或者通过网站提供可用的jdk源代码和二进制版本了)。
阅读全文…Progress on LLVM clang
As some of you already know, FreeBSD, along with some other Open Source projects, is moving away from GCC due to GPLv3. From a technology perspective, this also makes sense since the (likely) candidate, BSD-style licensed, LLVM based clang, a C compiler, is making reasonably good progress.
So, what should we expect from LLVM or clang?
Here is a good comparison between GCC and clang. Despite GCC is popular, considerably more mature, and supports more languages (especially C++, which clang’s support is incomplete at this moment), clang provides cleaner AST (Abstract Syntax Tree), much more modularized (if you take a look at GCC’s history, Richard Stallman intentionally made GCC’s code not reusable in other software), provided much more information for optimizer, is much faster and use much less memory, etc.
For FreeBSD, currently, clang can compile its kernel with only very few tweaks.
阅读全文…New strlen(3) committed
Finally, I got my strlen(3) [1] committed against -HEAD. This is a long story, to put it short, I had proposed assembly version of some string operations at the point of 2005, but these was never committed due to a hard disk failure, and as Bruce pointed out, having the hand optimized assembly code use a different algorithm is not good in general.
Therefore, I have take some time on it and reimplemented the idea in C, resulting in a portable (say, you can use it on any 32-bit or 64-bit processors, and it can be easily extended to 128-bit) version.
So, is it important for *YOU*?
Generally speaking, it should not. Performance sensitive programs should, by all means, avoid C style string operations. Think a 5x better strlen(3) would boost performance of your application since it uses strlen(3) in critical path? Think again!
However, I found it valuable. There is difference in worldstone, where I saw some minor improvements. Micro-benchmark indicates that this version is at most 2x slower when the string is very short, but 5x faster for strings that is at least word-length long.
[1] Note: the version has been further revised to provide better comment and match style(9).
阅读全文…7.1-RELEASE升级流量冲击导致portsnap服务同步受阻
许多老派的 FreeBSD 用户喜欢用源代码方式升级。运行了十多年的基于 cvsup 的同步机制由于有很多镜像支持因此一直没有遇到太大的问题,但是 FreeBSD 6.1 开始引入的 freebsd-update 提供了新的以二进制形式更新系统的方法,最近几年 FreeBSD 内核的许多改进已经使编译自定义的内核不再像以前那样重要了。
阅读全文…FreeBSD 7.1
我这次不铁口直断了,估计明年见了,如果这周能够RC2的话,最终RELEASE估计要到明年的1月5日左右。
这次FreeBSD 7.1在软件工程角度是相当失败的案例,我想我们应该从里面总结一些教训出来。
首先,我们的目标是什么?
我想,用户对于一个发行版本的期待是:一个经过了大量测试的、阶段性的稳定版本。而开发人员对于发行版本的期待则是尽可能地将可用的功能交付给用户。作为OS,我认为这应该包括自动化的回归测试、性能改进、更新的驱动程序、文档的修订,以及更新的第三方软件等等。
FreeBSD目前的开发模式,是将分别开发的三大模块,即内核与基本系统(src/)、文档(doc/)、第三方软件(ports/)的人在一定的时候聚集在一起,通过代码冻结的方法来使他们从增加新功能转移到集中去修bug,最后发布一个版本。这个模式在过去运转的相当好,以至于我们没有发现其中存在的问题。
这次FreeBSD 7.1暴露出来了这个模式存在的很多问题。例如,由于安全小组发现了很多安全漏洞,而另一方面,安全小组的人手不够,限制了修正这些问题的速度。我本人撰写的一个安全公告等了一个月才在今天最终公之于众,而另一方面,安全小组对于发行版本拥有一票否决的绝对权力,导致6.4和7.1的发布都一再推迟。
而作为非常快节奏的开发的 ports/ 维护者,则对不断的推迟感到相当不满。FreeBSD目前只维护 ports/ 的 -HEAD,也就是说,在正式发行 -RELEASE 之前,ports/ 不能进行大量的、破坏性的修改。例如,我本人维护的 OpenLDAP 现在就必须等待 -RELEASE 之后才可以进行升级。不断地推迟新的发行版本,会导致 ports/ 的开发继续延迟。
阅读全文…作弊条:如何远程启用/上面的SoftUpdates
说明:这个实际上是一个workaround,不过我暂时没时间修这个bug。这是一个作弊条,主要目的在于解决这一特定问题而非阐述其背后的原理和最佳实践。
阅读全文…MeetBSD 2008 (1)
今天起了一个大早,9:00到了位于 1600 Amphitheatre Parkway 的 Google 总部。
手头没有精确的人数统计,不过目测来看,大概有120-150人。看到的第一个见过照片的人是著名的 Cameraman 同学, DragonFly 的 Matthew Dillon 老大!
由于今年是 FreeBSD 计划成立15周年,今年的 MeetBSD ‘08 California 很大程度上是一次 FreeBSD 的活动。
阅读全文…MeetBSD 2008(CA)
MeetBSD 2008聚会将于11月15-16日在Mountain View的Google Campus举行。本次活动同时是为了庆祝FreeBSD成立15周年,活动报名费为$50。
参与评论DNS漏洞解析
最近炒的比较火的一个漏洞是 DNS 协议本身发现的一个严重问题(CERT VU#800113)。国内媒体对此的报道多数都语焉不详,因此我想有必要说说这个漏洞到底是怎么回事。
阅读全文…在 FreeBSD 的 Firefox 3 上使用 Google Toolbar
之前一直比较公开的一个秘密是,Google Toolbar实际上是可以在 FreeBSD 上运行的(注意不是通过 Linux ABI 支持)。不过 Firefox 3 发布之后,以前通过 Linux Firefox 安装 toolbar 这条路被堵住了,因此只好寻求新的解决途径。
阅读全文…