Kernel

共 215 篇文章。

*BSD queue.h

• Kernel

Derived from the ancient BSD Unix, *BSD has a set of queue related macros which are described in queue(3), and implemented in src/sys/sys/queue.h. These are primarily used in the kernel, but also useful for userland applications.

阅读全文… ( 本文约 100 字,阅读大致需要 1 分钟 )

我靠!!不带这么玩的……改一个sysctl能让mysql性能提高6倍?!

• Kernel

最近 current 邮件列表讨论的很凶的一个问题是,MySQL很不理性地在每一个I/O操作时都调一次time()。这一操作在FreeBSD上面相当的昂贵(为了保证精度),而Linux采取了许多优化(有些是牺牲精度的)措施,因而性能差距越来越大。

于是有一个人在FreeBSD上做了试验,说改一下默认的时钟能够将性能提高6倍……不带这么玩的,ft……

BTW. clive也测了一下,在他机器上结果是:

阅读全文… ( 本文约 257 字,阅读大致需要 1 分钟 )

Linux threading bug

• Kernel

A collegue of mine has reported a FreeBSD “bug” that, when the main thread exits, the whole process is terminated. He complained that pthread_detach() would not cause the thread to run without the main thread, while Linux did.

With some experiments we have figured out that this is actually a Linux bug, which violates POSIX. Interestingly, Solaris has the same behavior that FreeBSD have.

The POSIX pthread_create() said:

Note that the thread in which main() was originally invokeddiffers from this. When it returns from main(), the effectshall be as if there was an implicit call to exit() usingthe return value of main() as the exit status."

阅读全文… ( 本文约 161 字,阅读大致需要 1 分钟 )

ZERO_COPY_SOCKET discouraged for now

• Kernel

It seems that we still have some race conditions that can lead to strange issues and we may want to discourage this for 6.0-RELEASE.

Alan Cox has committed some fixes for the issue, hope these can be merged back.

参与评论

Signal in init(8)?!

• Kernel

Strange thing happen.

  1. Start your FreeBSD single-user.
  2. Run /etc/netstart so your network is up.
  3. Run /etc/rc.d/sshd start so you have sshd
  4. Use ssh to login localhost, then su(1) to root
  5. Type “init q”

Then init(8) would crash with signal 11. Yes, it was killed. As soon as kernel found this, it would panic with “Going nowhere without my init!”.

参与评论

Winsock ConnectEx function

• Kernel

Today jianghong has pointed out that ConnectEx found in Windows Socket API has combined the connection and sending of the first block of data together within one system call. I think this is desirable for us too, as this can reduce unnecessary context switches.

FreeBSD has accept_filter(9) mechanism that does similiar thing for accept(2).

参与评论

6.0-BETA5

• Kernel

Today the 6-STABLE branch has been named “6.0-BETA5”. A lot of known issues has been addressed and fixed. This beta has disabled the debugging options found in -CURRENT as well.

参与评论