FreeBSD Committer Xu Yifeng Interview

zhaozj2021-02-16  42

FreeBSD Committer Xu Yifeng Interview

From:

Www.freebsdchina.org

Published: Delphij Time: 2004/01/23 21:55:14 ----------------------------------- ------------------------------------ FreeBSDCHINA community recently interviewed Xu Yife (David XU), one from FreeBSD SRC Committer in mainland China. Mr. Xu Ye has made considerable contributions in the FreeBSD KSE project. In this interview, he talked about some of the experiences, KSE, SMPNG, and some things about FreeBSD. We are very grateful to Mr. Xu to accept our interview and hope that this interview can help you learn about FreeBSD. -------------------------------------------------- --------------------- Li Xin (hereinafter referred to as "Li"): Can you briefly introduce some basic situation about you? Xu Yi Feng (hereinafter referred to as "Xu"): I am Zhejiang Shaoxing, 35 years old, and work several places after graduation, live in Hangzhou, married. Lee: What is the development of FreeBSD? Xu: I have been using FreeBSD before I become FreeBSD SRC Committer, and I am not satisfied with FreeBSD's POSIX THREAD (PTHREAD). I have always hope that there is a better performance PTHread support. In 2002, I was fortunate to have Julian Elischer. The FreeBSD kernel thread has made a lot of communication work, Julian Elischer is very friendly to help me become SRC Committer. Li: You have become FreeBSD SRC Committer in September 2002. Since then, you have almost all of you in FreeBSD Project. Related to KSE. In addition to KSE, do you interested in those technologies? Xu: I am currently concentrated in the KSE project, mainly because this project has not been completed, and the complexity is bigger than the original idea, and Julian Elischer is reduced on this project due to home reasons, and now is Daniel. Eischen and I am doing this project, I think this project is completed, it needs to take a break. May be related to my nature, I will support the FREEBSD to support embedded systems. Li: May also play a number of open source software development, where is your company to develop freebsD? Your company is supported by your company? How do you solve the survival problem? Xu: I also go to work during the day. There is no time, you can freely dominate the time to concentrate on evening and Sunday. The company doesn't know that I am a FreeBSD, and the development of FreeBSD I am from hobbies, I have nothing to do with the actual work, but I will use FreeBSD to do the CVS / Web / File server in the project team. At present, the company gives me the salary to survive. Lee: In foreign countries (especially those engaged in drivers) FreeBSD developers, you can often get some hardware donations from hardware vendors. What do you think about these donations? Do you need a similar donation? Xu: Donation is necessary, because developers are impossible to have different platforms and various hardware, individuals to buy a variety of hardware to engage in development is also unrealistic, donation is beneficial to some hardware better and better by FreeBSD as soon as possible stand by. I originally in order to complete the KSE's SMP test, I really want to get SMP machine, and some people have wanted to donate, but I have given up because of the freight is too expensive. Later I bought a pair of P3 motherboards.

A wish is to develop 64-bit development in the future. :-) Lee: In addition to the scheduler and thread library (libthr & libkse), KSE also involves the system which part of the system? Relative to Jason Evans' "kernel-scheduled entities for freebsd", what is the concept of KSE now? Major change? Xu: KSE basically belongs to this layer of scheduler, has nothing to do with other parts. The current KSE project is basically the idea of ​​Jason Evans, and of course there are some differences, mainly for scheduler. Support on SA is a bit different from the idea at the time, and now supports SA support has been relatively independent with the scheduler, not the imaginary it is as close to it. Li: KSE is the main difference between Solaris LWP? After using the Scheduler Activation concept, the kernel provides users with more accurate scheduling information by providing UTS, or if the user needs to be able to play its role? Or, users only need to connect A thread library that supports KSE can be? Xu: FreeBSD kernel is now threaded, but also provides LWP with Linux's Clone process, but this part is not the main part of FreeBSD. FreeBSD mainly uses its own thread model, one process can have multiple kernel threads, and LWP is essentially a degraded process, but it is still a process. The interface provided by the kernel is not directly used by the user. It is not easy to use directly, the user is best to use libkse, and libkse provides the call interface of PTHREAD to implement all the features of libc_r, and its performance Beyond libc_r, and introduce new PThread features, such as libkse support PTHREAD's Process Scope and System Scope concept, users can continue to connect directly to Libkse directly, but can also consider using new introduction features. Lee: Is there any significant difference in the NPTL implementation on the KSE thread library? If so, do these differences have a big impact on developers or users? Xu: I am not very understanding NPTL, but Kse is some concepts that wants to support pthread, such as static priority scheduling, SCHED_RR, SCHED_FIFO, Priority Mutex, Process Scope, and System Scope, POSIX THREAD for thread scheduling requirements and tradition The Dynamic priority scheduling algorithm of UNIX is different, and these features are difficult to implement in the kernel, and the KSE developers tend to implement these features in the library of user mode, and many functions There is also the Libc_R, while other operating systems may not have this function, we don't want to lose. When the user uses the libkse library, it is best to have a full understanding of pthread, and should be careful at changing the thread priority. In Libkse, change the thread priority, which does have some effects, which is also inherited from libc_r. Lee: Do you use the ULE scheduler whether to improve the performance of the application that uses KSE? Xu: ULE's main advantage is to better support SMP, automatically support CPU Affinity, which is to try to keep a thread in a certain The CPU is executed to improve the hit rate of CPU Cache, which brings system performance improvement, which is more beneficial for each program or more, and the process effect of those maining time on the CPU. If it is a single CPU system, the effect will not have a large advantage over 44BSD.

Lee: FreeBSD 5.3-Release Plan Set ULE scheduler and KSE thread library as the default configuration of the operating system, do you think this is mature? Before this, what kind of work do you think still need to do? Xu: The timing is basically mature, the main task is to let the ports system can connect libkse or libthr and libc_r smoothly, appointed by the user, and is to complete the debugging support for libkse for Libkse. Li: For developers, the debugger that is easy to use will undoubtedly help them achieve the effect of halving, and for a program that uses threads. Can you recommend some debugging tools or debugging skills related to KSE? Xu: Libkse's debugging support will be added to GDB, GDB already has a good debugging support for threads, Libkse does not need debugging tools other than GDB . I don't use the debugger, mainly I don't want to rely on it, the most useful for me is Assert and Printf. Lee: For the server running apache2 (worker mpm), MySQL 4.x, PHP 4.x server, you think you think Which set KSE thread library is better? Xu: I think that the current libkse is best, after which Libkse or Libthr is better, it is difficult to say that there will be some other options, and the end result is that we will have a better system. Lee: NetBSD's Scheduler Activation implementation and freeBSD kse What is the main difference? Xu: NetBSD's Scheduler Activation is basically LWP, while Kse is not. Li: SMPNG uses a large number of thin locks to replace the Giant lock in the whole core, which also increases the complexity of the code and verifies the difficulty of correctness. Do you think there is a better way to solve the MP-synchronization problem of the kernel? Xu: I think the current kernel WITNESS deadlock monitoring system is still very effective, can monitor most deadlines, the only defect is not supported on the traditional LockMGR lock, and this lock is more in the file system, I also think that the correctness of the OS that supports SMP is difficult, one of the questions is Race Condition, it is difficult to find that there is no good way to detect this problem. Lee: Do you think that after 5-Stable and 5/6 Branching, does the SMPNG's architecture will also change? Xu: The basic framework does not change, but the optimization of each subsystem is still possible, such as the SMP of TCP / IP, and the improvement of the interrupt processing subsystem. Le: Can I introduce some experience in debugging the SMP kernel? Xu: About debugging the SMP kernel, in addition to the low-level code related to the scheduler and supporting SMP, other parts are basically not concerned with SMP, most of the program only needs to be controlled by concurrent access, using lock and keeps The data structure is not used and damaged, avoiding RACE CONDition, avoid death lock, etc. In addition to FreeBSD, do you also use other operating systems? Do you also participate in other (open source) operating systems development? Xu: I also use Windows, Linux, because of work needs. In addition to FreeBSD, I didn't participate in other open source projects.

转载请注明原文地址:https://www.9cbs.com/read-27574.html

New Post(0)