Kernel
libthr修成正果
Daniel刚刚commit的symver变动中包含了一项最新的改动──将libthr「扶正」为libpthread。这样,FreeBSD从7.0-RELEASE开始,将正式默认采用1:1线程,而不是原先的libkse(M:N线程)作为线程库,类似Solaris。
参与评论Giant被替换为Midget
这是SMPng Project的最后一步。
阅读全文…Log: Final stage of SMP pushdown: rename the Giant lock to the Midget lock.
提名了一位src committer
昨天 Robert代表core team回信说他们将投票决定我对一位 ports/ committer 增加 src/ bit 权限的提名。祝这位同学闯关顺利 :-)
参与评论PRS_NEW: Check it or not?
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.
阅读全文…ULE 2.0 hits -HEAD
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.
阅读全文…给tarsier上了RC2
附加了一系列自己的patch,reboot。
[delphij@tarsier] ~> uname -a
FreeBSD tarsier.delphij.net 6.2-RC2 FreeBSD 6.2-RC2 #0: Sat Dec 30 01:18:20 CST 2006 delphij@tarsier.delphij.net:/usr/obj/usr/src/sys/TARSIER i386
如何:为 FreeBSD UFS2 文件系统恢复受损的主超级块
HOWTO: Recover damaged FreeBSD UFS2 file systems with damaged master super-block
Copyright © Xin LI, 2006.
All Rights Reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
注意:本文介绍的方法部分,假定读者对UFS文件系统,以及FreeBSD的日常操作相当熟悉;请勿轻易执行本文介绍的操作,本文中的操作,可能导致fsck_ffs(8)无法修正的严重问题。由于在此本人已明确告知读者这一风险,据此,对于由于执行这些操作导致的任何数据损失,本人明示不承担任何责任。
阅读全文…招商银行新版本与64-位 Windows不兼容
\SystemRoot\SysWow64\Drivers\KBWatch.SYS has been blocked from loading due to incompatibility with this system. Please contact your software vendor for a compatible version of the driver.
真是无话可说了。
参与评论ZFS成功完成在FreeBSD上的第一阶段移植
在Pawel Jakub Dawidek的不懈努力之下,目前ZFS在FreeBSD -CURRENT上已经处于主体功能可运行状态了。尽管目前其性能还不如UFS,并且在高负载情况下会出现panic,但patch已经处于可用状态。
参与评论MUTEX_PROFILING拓展为LOCK_PROFILING了
对于MP内核来说,这是一项用于寻找内核中存在的性能弱点的重要工具。早先kris做的性能评估看来可以继续、常规化地做下去了。
参与评论