January 2007 Archives

诡异的freetype2问题

| No Comments | No TrackBacks

今天帮同事调一个程序。

问题:服务器,FreeBSD 6.2上,某程序速度是一台配置较低的笔记本上的Ubuntu的大约1/10。

折腾许久,手工改了一堆port,发现没作用。遂祭出ktrace,发现那个程序十分不理性地mmap一个中文ttf文件;将字体改为英文的,则速度一样。另一个诡异的问题是,使用中文字体会疯狂吃内存。

然后改了freetype2,令其不使用mmap,发现不再出现不理性的内存占用了,速度提高10倍。

今天core team批准了rafan同学的commit权限升级。目前,他已经获得了FreeBSD ports/ 和 src/ 两个代码库的 commit bit。

FreeBSD 1.x时代的CVS

| No Comments | No TrackBacks

由于Caldera已经将32/V开源,目前FreeBSD 1.x时代的CVS已经可以重见天日。特设立此cvsweb以供世人观看。

FreeBSD 1.x受到AT&T诉讼的影响,曾在1994年6月和解并发布1.1.5.1-RELEASE之后,不得不重建了CVS库(这也是为什么FreeBSD的src/代码库的目录名是/home/ncvs而不是/home/cvs的原因)。随后,经过数月的努力,基于可自由再发布的4.4BSD-Lite代码系的FreeBSD 2.0于1994年11月正式发布。

心情非常的不好

| 2 Comments | No TrackBacks

莫名其妙的感觉。

作者 Bruce Schneier
原文 Debating Full Disclosure

作者授权 blog.delphij.net 发表此翻译版本。未经许可请勿转载

全面披露 —— 将安全漏洞的细节公之于众 —— 是一种很好的做法。公开并让更多的人检查是改善安全唯一可靠的途径,而遮遮掩掩则只会让我们的安全受到损害。

今天我将把FreeBSD中的又一个“自由”(GPL授权)软件——gzip——替换为一个可以自由再发布的(BSD授权)版本。这一版本已经经过长期测试,特别是FreeBSD port联编集群的考验。

替换gzip的主要导火索是去年由Google公司安全团队发现的CVE-2006-4334、CVE-2006-4335、CVE-2006-4336、CVE-2006-4337、CVE-2006-4338等一系列问题,以及由于修正这些问题所引入的f2c压缩文件无法解压的回归问题。新版本的FreeBSD gzip来自于NetBSD的Matthew R. Green所撰写的、基于可自由再发布的zlib压缩库的用户界面接口。

不自强,活该挨打

| 4 Comments | No TrackBacks

看到一条很有意思的新闻,节录一部分:

”Three government bodies -- the Ministry of Information and Communication, the Ministry of Government Administration and Home Affairs, and the Financial Supervisory Service -- warned Tuesday about the expected confusion. The problem is that Vista doesn't play well with a software program called Active-X that is widely used in Korean Internet sites. Without support for Active-X, online services that Koreans use everyday like banking, stock trading, and shopping won't be available. Vista users will also experience problems with government sites in applying for and printing documents and certificates.“

谁让你们当初非要用Active-X,非要让软件只支持专有系统了?现在慌神了?早干什么去了?

活该,哈哈。

提名了一位src committer

| 3 Comments | No TrackBacks

昨天 Robert代表core team回信说他们将投票决定我对一位 ports/ committer 增加 src/ bit 权限的提名。祝这位同学闯关顺利 :-)

CNBeta上看到一条消息,说是某公司甲开始拒绝使用另一家公司乙的邮箱注册,理由是“不稳定”。

Since 2004/01/18

| 1 Comment | No TrackBacks

So, it's 2007/01/18 now. Happy birthday to the blog.

PRS_NEW: Check it or not?

| No Comments | No TrackBacks

It seems that I have caught a race condition which can be triggered by renice(1), and we need to take PRS_NEW into account when we need to access several attributes of a process object.

Robert has pointed out that we may want to just initialize the attribute early to avoid the race condition. After reading some old 4.4BSD code it seems that the process object is linked into allproc list *before* everything is initialized.

PRS_NEW was introduced by the original KSE commit where p_stat was replaced with p_state and has replaced SIDL. The latter was in 4.4BSD.

一二三四五六七
孝悌忠信礼义廉

关于FreeBSD 6.2-RELEASE

| No Comments | No TrackBacks

感谢对岸国立交通大学资讯工程学系台湾大学计算机与资讯网路中心提供的网络资源,ftp.cn.freebsd.org (a.k.a. ftp.freebsdchina.org)得以以2MB/s的速度完成了FreeBSD 6.2-RELEASE镜像传输。

在这里要告诉大家的是,目前为止,FreeBSD尚未官方正式公告此一版本之正式发布。在正式公告之前,请耐心等待,不要过早下载这一版本。

三类人

| No Comments | No TrackBacks

别人总结的。

一类可以做朋友,这类人绝对不能有(在我看来是)人品问题的问题;
一类可以做生意,这类人也许有一些在我看来是人品问题的问题,但是他们有底限;
还有一类既不能做朋友,也不能做生意,因为这些人连底限都没有。

DNS中的SRV记录

| 1 Comment | No TrackBacks

最近看代码时了解到的,顺手查了一下,在此留个记录:

SRV记录的作用是指明某域名下提供的服务。

例子:

_http._tcp.example.com. SRV 10 5 80. www.example.com

SRV后面项目的含义:

10 - 优先级,类似MX记录
5 - 权重
80 - 端口
www.example.com - 实际提供服务的主机名。

不过实际在Internet上用这个的似乎非常之少。

在tcpm上看到一篇论文

| No Comments | No TrackBacks

今天有人在IETF的tcpm上有人提到一篇《Misbehaving TCP Receivers Can Cause Internet-Wide Congestion Collapse》的论文。看起来是一个很有意思的问题,即,乐观ACK(opt-ack)在作者看来是一个潜在的DoS攻击工具,而且粗略地扫了一眼,这个问题很可能是真实存在的(但是这篇2005年11月的文章,目前似乎只有Sun做了回应……),等周末有时间研究一下。

冒个泡……

| 3 Comments | No TrackBacks

没事,告诉大家我还活着,只是最近几天手上事情比较多。

起初,他们只是不支持FreeBSD/Linux,我有Windows远程桌面,我没投诉;
到后来,他们不允许Windows远程桌面,我可以本地访问一台64位的Windows 2003 Server,勉强投诉两句,暂时也忍了;
再后来,他们又写了不支持64位Windows 2003 Server的所谓“安全”驱动,我拼命投诉,可是他们不理我了,更有人说,我是“小众系统”,正如一开始人们说FreeBSD/Linux两种系统一样。

ULE 2.0 hits -HEAD

| No Comments | No TrackBacks

Today, Jeff Roberson has committed his version 2.0 ULE scheduler. This new version has addressed several design issues as well as several bugs.

The new scheduler has adopted a circular queue, instead of the double-queue structure which is also found in the Linux O(1) scheduler. The latter has lead to difficulty implementing nice correctly.

For uniprocessor case, ULE is now faster.

MP algorithm has been simplified a bit.

A lot of bugfixes, etc.

To quote the original commit message:

ULE 2.0:
- Remove the double queue mechanism for timeshare threads. It was slow due to excess cache lines in play, caused suboptimal scheduling behavior with niced and other non-interactive processes, complicated priority lending, etc.
- Use a circular queue with a floating starting index for timeshare threads. Enforces fairness by moving the insertion point closer to threads with worse priorities over time.
- Give interactive timeshare threads real-time user-space priorities and place them on the realtime/ithd queue.
- Select non-interactive timeshare thread priorities based on their cpu utilization over the last 10 seconds combined with the nice value. This gives us more sane priorities and behavior in a loaded system as compared to the old method of using the interactivity score. The interactive score quickly hit a ceiling if threads were non-interactive and penalized new hog threads.
- Use one slice size for all threads. The slice is not currently dynamically set to adjust scheduling behavior of different threads.
- Add some new sysctls for scheduling parameters.

Bug fixes/Clean up:
- Fix zeroing of td_sched after initialization in sched_fork_thread() caused by recent ksegrp removal.
- Fix KSE interactivity issues related to frequent forking and exiting of kse threads. We simply disable the penalty for thread creation and exit for kse threads.
- Cleanup the cpu estimator by using tickincr here as well. Keep ticks and ltick/ftick in the same frequency. Previously ticks were stathz and others were hz.
- Lots of new and updated comments.
- Many many others.

Tested on: up x86/amd64, 8way amd64.

Monthly Archives

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.2.3