<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Kernel on Tony Bai</title><link>https://tonybai.com/tags/kernel/</link><description>Recent content in Kernel on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Wed, 21 Jan 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/kernel/index.xml" rel="self" type="application/rss+xml"/><item><title>当 Go 遇上 GPU：用 CUDA 释放千倍算力的实战指南</title><link>https://tonybai.com/2026/01/21/integrating-cuda-in-go/</link><pubDate>Wed, 21 Jan 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/01/21/integrating-cuda-in-go/</guid><description>本文永久链接 – https://tonybai.com/2026/01/21/integrating-cuda-in-go 大家好，我是Tony Bai。 长期以来，高性能计算（HPC）和 GPU 编程似乎是 C++ 开发者的专属领地。Go 语言虽然在并发和服务端开发上表现卓越，但在触及 GPU 算力时，往往显得力不从心。 然而，在最近的 GopherCon 2025 上，软件架构师 Sam B...</description></item><item><title>2025年最佳机器人Linux操作系统——顶级发行版与最新进展！</title><link>https://tonybai.com/2025/08/17/best-linux-os-for-robotics-in-2025/</link><pubDate>Sun, 17 Aug 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/08/17/best-linux-os-for-robotics-in-2025/</guid><description>本文永久链接 – https://tonybai.com/2025/08/17/best-linux-os-for-robotics-in-2025 大家好，我是Tony Bai。 如果你正投身于机器人技术领域，选择正确的操作系统至关重要。随着人工智能、自动化和机器学习的进步，机器人正变得前所未有的复杂。在为这些智能机器提供动力方面，Linux凭借其开源的灵活性、稳定性以及对机器人框架的广泛支持，...</description></item><item><title>内核之外的冰山：为什么说从零写一个操作系统已几乎不可能？</title><link>https://tonybai.com/2025/08/16/brand-new-os-impossible/</link><pubDate>Sat, 16 Aug 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/08/16/brand-new-os-impossible/</guid><description>内核之外的冰山：为什么说从零写一个操作系统已几乎不可能？ - Tony Bai Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进阶课FAQ * 关于我 * 我的技术专栏 * 文章列...</description></item><item><title>为何Go语言迟迟未能拥抱 io_uring？揭秘集成的三大核心困境</title><link>https://tonybai.com/2025/08/11/why-go-not-embrace-iouring/</link><pubDate>Mon, 11 Aug 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/08/11/why-go-not-embrace-iouring/</guid><description>本文永久链接 – https://tonybai.com/2025/08/11/why-go-not-embrace-iouring 大家好，我是Tony Bai。 在 Linux I/O 的世界里，io_uring 如同划破夜空的流星，被誉为“终极接口”。它承诺以无与伦比的效率，为数据密集型应用带来革命性的性能提升。正如高性能数据库 ScyllaDB 在其官方博文中所展示的，io_uring 能...</description></item><item><title>Go官方 HTTP/3 实现终迎曙光：x/net/http3 提案启动，QUIC 基础已就位</title><link>https://tonybai.com/2025/08/02/proposal-http3/</link><pubDate>Sat, 02 Aug 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/08/02/proposal-http3/</guid><description>本文永久链接 – https://tonybai.com/2025/08/02/proposal-http3 大家好，我是Tony Bai。 在社区长达数年的热切期盼之后，Go 官方终于迈出了支持 HTTP/3 的关键一步。一项编号为#70914的新提案，正式建议在 x/net/http3 中添加一个实验性的 HTTP/3 实现。这一进展建立在另一项更基础的提案 #58547(x/net/quic...</description></item><item><title>如何像gitlab-runner那样将Go应用安装为系统服务</title><link>https://tonybai.com/2022/09/12/how-to-install-a-go-app-as-a-system-service-like-gitlab-runner/</link><pubDate>Mon, 12 Sep 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/09/12/how-to-install-a-go-app-as-a-system-service-like-gitlab-runner/</guid><description>本文永久链接 – https://tonybai.com/2022/09/12/how-to-install-a-go-app-as-a-system-service-like-gitlab-runner 在《让reviewdog支持gitlab-push-commit，守住代码质量下限》一文中，gitlab-runner(一个Go语言开发的应用)通过自身提供的install命令将自己安装为了一个...</description></item><item><title>Go 1.19中值得关注的几个变化</title><link>https://tonybai.com/2022/08/22/some-changes-in-go-1-19/</link><pubDate>Mon, 22 Aug 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/08/22/some-changes-in-go-1-19/</guid><description>本文永久链接 – https://tonybai.com/2022/08/22/some-changes-in-go-1-19 我们知道Go团队在2015年重新规定了团队发布版本的节奏，将Go大版本的发布频率确定为每年两次，发布窗口定为每年的2月与8月。而实现自举的Go 1.5版本是这一个节奏下发布的第一个版本。一般来说，Go团队都会在这两个窗口的中间位置发布版本，不过这几年也有意外，比如承载着泛...</description></item><item><title>使用Go语言实现eBPF程序内核态与用户态的双向数据交换</title><link>https://tonybai.com/2022/07/25/bidirectional-data-exchange-between-kernel-and-user-states-of-ebpf-programs-using-go/</link><pubDate>Mon, 25 Jul 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/07/25/bidirectional-data-exchange-between-kernel-and-user-states-of-ebpf-programs-using-go/</guid><description>本文永久链接 – https://tonybai.com/2022/07/25/bidirectional-data-exchange-between-kernel-and-user-states-of-ebpf-programs-using-go 在之前的两篇文章中，无论是使用C语言开发eBPF程序，还是使用Go开发的eBPF程序，都是hello world级别的，可能有用，但谈不上十分实用。 ...</description></item><item><title>使用Go语言开发eBPF程序</title><link>https://tonybai.com/2022/07/19/develop-ebpf-program-in-go/</link><pubDate>Tue, 19 Jul 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/07/19/develop-ebpf-program-in-go/</guid><description>本文永久链接 – https://tonybai.com/2022/07/19/develop-ebpf-program-in-go 在前面的《使用C语言从头开发一个Hello World级别的eBPF程序》一文中，我们详细说明了如何基于C语言和libbpf库从头开发一个eBPF程序(包括其用户态部分)。那篇文章是后续有关eBPF程序开发文章的基础，因为到目前为止，无论eBPF程序的用户态部分用什...</description></item><item><title>使用C语言从头开发一个Hello World级别的eBPF程序</title><link>https://tonybai.com/2022/07/05/develop-hello-world-ebpf-program-in-c-from-scratch/</link><pubDate>Tue, 05 Jul 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/07/05/develop-hello-world-ebpf-program-in-c-from-scratch/</guid><description>本文永久链接 – https://tonybai.com/2022/07/05/develop-hello-world-ebpf-program-in-c-from-scratch * * * 近两年最火的Linux内核技术非eBPF莫属！ 2019年以来，除了eBPF技术自身快速演进之外，基于eBPF技术的观测(Observability)、安全(Security)和网络(Networking)...</description></item><item><title>BPF和Go：在Linux中内省的现代方式[译]</title><link>https://tonybai.com/2020/12/25/bpf-and-go-modern-forms-of-introspection-in-linux/</link><pubDate>Fri, 25 Dec 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/12/25/bpf-and-go-modern-forms-of-introspection-in-linux/</guid><description>本文翻译自马可·凯瓦克（Marko Kevac）的《BPF and Go: Modern forms of introspection in Linux》(https://medium.com/bumble-tech/bpf-and-go-modern-forms-of-introspection-in-linux-6b9802682223)。 每个人都有自己喜欢的关于魔法的书。对于一个人来说是托...</description></item><item><title>后端程序员一定要看的语言大比拼：Java vs. Go vs. Rust</title><link>https://tonybai.com/2020/05/01/comparison-between-java-go-and-rust/</link><pubDate>Fri, 01 May 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/05/01/comparison-between-java-go-and-rust/</guid><description>这是Java，Go和Rust之间的比较。这不是基准测试，更多是对可执行文件大小、内存使用率、CPU使用率、运行时要求等的比较，当然还有一个小的基准测试，可以看到每秒处理的请求数量，我将尝试对这些数字进行有意义的解读。 为了尝试尽可能公平比较，我在此比较中使用每种语言编写了一个Web服务。Web服务非常简单，它提供了三个REST服务端点(endpoint)。 Web服务提供的服务端点 这三个Web服...</description></item><item><title>图解git原理的几个关键概念</title><link>https://tonybai.com/2020/04/07/illustrated-tale-of-git-internal-key-concepts/</link><pubDate>Tue, 07 Apr 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/04/07/illustrated-tale-of-git-internal-key-concepts/</guid><description>git是那个“爱骂人”的Linux之父Linus Torvalds继Linux内核后奉献给全世界程序员的第二个礼物（不能确定已经逐渐老去的Torvalds能否迸发第三春，第三次给我们一个超大惊喜^\_^）。这里再强调一下，git读作**/git/**，而不是**/dʒit/**。 在诞生十余载后(2005年发布第一版)，**git**毫无争议地成为了程序员版本管理工具的首选，它改变了全世界程序员的...</description></item><item><title>Hello，WireGuard</title><link>https://tonybai.com/2020/03/29/hello-wireguard/</link><pubDate>Sun, 29 Mar 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/03/29/hello-wireguard/</guid><description>2020年1月28日，Linux之父Linus Torvalds正式将WireGuard merge到Linux 5.6版本内核主线： 图：WireGuard被加入linux kernel 5.6主线的commit log 这意味着在Linux 5.6内核发布时，linux在内核层面将**原生**支持一个新的VPN协议栈：WireGuard。 图：WireGuard Logo 一. VPN与Wir...</description></item><item><title>Go 1.14中值得关注的几个变化</title><link>https://tonybai.com/2020/03/08/some-changes-in-go-1-14/</link><pubDate>Sun, 08 Mar 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/03/08/some-changes-in-go-1-14/</guid><description>可能是得益于2020年2月26日Go 1.14的发布，在2020年3月份的TIOBE编程语言排行榜上，Go重新进入TOP 10，而去年同期Go仅排行在第18位。虽然Go语言以及其他主流语言在榜单上的“上蹿下跳”让这个榜单的权威性饱受质疑:)，但Go在这样的一个时间节点能进入TOP 10，对于Gopher和Go社区来说，总还是一个不错的结果。并且在一定层度上说明：Go在努力耕耘十年后，已经在世界主流...</description></item><item><title>TB一周萃选[第7期]</title><link>https://tonybai.com/2018/01/28/7th-issue-of-the-tech-weekly-carefully-chosen-by-tonybai/</link><pubDate>Sun, 28 Jan 2018 00:00:00 +0800</pubDate><guid>https://tonybai.com/2018/01/28/7th-issue-of-the-tech-weekly-carefully-chosen-by-tonybai/</guid><description>本文是首发于个人微信公众号的文章**“TB一周萃选\[第7期\]”**的归档。 &amp;gt; 我看过小马哥(哈维尔·马斯切拉诺)踢球， &amp;gt; 你看过小马哥踢球， &amp;gt; 他看过小马哥踢球。 &amp;gt; 我们看过小马哥踢球， &amp;gt; 你们看过小马哥踢球， &amp;gt; 他们看过小马哥踢球！ &amp;gt; &amp;gt; — 改编自网络资料 都说三九天是一年中最冷的一段时间，但我们这里稍有偏差，就个人赶脚：四九、五九才是我们这里温度的最低点。这一周的感受用一句...</description></item><item><title>Hello，Termux</title><link>https://tonybai.com/2017/11/09/hello-termux/</link><pubDate>Thu, 09 Nov 2017 00:00:00 +0800</pubDate><guid>https://tonybai.com/2017/11/09/hello-termux/</guid><description>**_程序员或多或少都有一颗Geek(极客)的心^0^。- Tony Bai_** 折腾开始。 这一切都源于前不久将手机换成了Xiaomi的MIX2。因为青睐开放的系统（相对于水果公司系统的封闭，当然Mac笔记本除外^0^），我长期使用Android平台)的手机。但之前被三星Note3手机的“大屏”搞的不是很舒服，这两年一直用5寸及以下的手机，因为单手操作体验良好。MIX2的所谓“全面屏”概念又让...</description></item><item><title>源创会2017沈阳站讲稿：基于Harbor的高可用企业级私有容器镜像仓库部署实践</title><link>https://tonybai.com/2017/10/23/the-speech-script-practice-on-deploying-a-ha-harbor-cluster-for-osc-shenyang-2017/</link><pubDate>Mon, 23 Oct 2017 00:00:00 +0800</pubDate><guid>https://tonybai.com/2017/10/23/the-speech-script-practice-on-deploying-a-ha-harbor-cluster-for-osc-shenyang-2017/</guid><description>上周六开源中国的源创会在沈阳举办了一次技术活动，很荣幸以本地讲师的身份和大家交流了一个topic: “基于Harbor的高可用企业级私有容器镜像仓库部署实践”。之所以选择这个topic，是因为这是我们团队的项目实践心得。很多企业和组织在深入使用Docker之后，都会有类似的高可用私有容器仓库搭建的需求，于是我就把我们摸索的实践和填坑过程拿出来，用30分钟与大家分享一下。另外这算是一个入门级的分享，...</description></item><item><title>理解Kubernetes网络之Flannel网络</title><link>https://tonybai.com/2017/01/17/understanding-flannel-network-for-kubernetes/</link><pubDate>Tue, 17 Jan 2017 00:00:00 +0800</pubDate><guid>https://tonybai.com/2017/01/17/understanding-flannel-network-for-kubernetes/</guid><description>第一次采用kube-up.sh脚本方式安装的Kubernetes cluster目前运行良好，master node上的组件状态也始终是“没毛病”： kubectl get cs NAME STATUS MESSAGE ERROR controller-manager Healthy ok scheduler Healthy ok etcd-0 Healthy {&amp;#34;health&amp;#34;: &amp;#34;true&amp;#34;}...</description></item><item><title>理解Docker容器网络之Linux Network Namespace</title><link>https://tonybai.com/2017/01/11/understanding-linux-network-namespace-for-docker-network/</link><pubDate>Wed, 11 Jan 2017 00:00:00 +0800</pubDate><guid>https://tonybai.com/2017/01/11/understanding-linux-network-namespace-for-docker-network/</guid><description>由于2016年年中调换工作的原因，对容器网络的研究中断过一段时间。随着当前项目对Kubernetes应用的深入，我感觉之前对于容器网络的粗浅理解已经不够了，容器网络成了摆在前面的“一道坎”。继续深入理解K8s网络、容器网络已经势在必行。而这篇文章就算是一个重新开始，也是对之前浅表理解的一个补充。 我还是先从Docker容器网络入手，虽然Docker与Kubernetes采用了不同的网络模型：K8s...</description></item><item><title>理解Unikernels</title><link>https://tonybai.com/2016/05/16/understanding-unikernels/</link><pubDate>Mon, 16 May 2016 00:00:00 +0800</pubDate><guid>https://tonybai.com/2016/05/16/understanding-unikernels/</guid><description>当Docker, Inc在今年年初宣布收购Unikernel Systems公司时，Unikernel对大多数技术人员来说还是很陌生的。直到今天，知名问答类网站知乎上也没有以Unikernel为名字的子话题。国内搜索引擎中关于Unikernel的内容很少，实践相关的内容就更少了。Docker收购Unikernel Systems，显然不是为了将这个其未来潜在的竞争对手干掉，而是嗅到了Unikern...</description></item><item><title>理解Docker跨多主机容器网络</title><link>https://tonybai.com/2016/02/15/understanding-docker-multi-host-networking/</link><pubDate>Mon, 15 Feb 2016 00:00:00 +0800</pubDate><guid>https://tonybai.com/2016/02/15/understanding-docker-multi-host-networking/</guid><description>在Docker 1.9 出世前，跨多主机的容器通信方案大致有如下三种： 1、端口映射 将宿主机A的端口P映射到容器C的网络空间监听的端口P’上，仅提供四层及以上应用和服务使用。这样其他主机上的容器通过访问宿主机A的端口P实 现与容器C的通信。显然这个方案的应用场景很有局限。 2、将物理网卡桥接到虚拟网桥，使得容器与宿主机配置在同一网段下 在各个宿主机上都建立一个新虚拟网桥设备br0，将各自物理网卡...</description></item><item><title>理解Docker容器端口映射</title><link>https://tonybai.com/2016/01/18/understanding-binding-docker-container-ports-to-host/</link><pubDate>Mon, 18 Jan 2016 00:00:00 +0800</pubDate><guid>https://tonybai.com/2016/01/18/understanding-binding-docker-container-ports-to-host/</guid><description>在”理解Docker单机容器网络“一文中，还有一个Docker容器网络的功能尚未提及，那就是Docker容器的端口映射。即将容器的服务端口P’ 绑定到宿主机的端口P上，最终达到一种效果：外部程序通过宿主机的P端口访问，就像直接访问Docker容器网络内部容器提供的服务一样。 Docker针对端口映射前后有两种方案，一种是1.7版本之前docker-proxy+iptables DNAT的方式；另一...</description></item><item><title>理解Docker单机容器网络</title><link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/</link><pubDate>Fri, 15 Jan 2016 00:00:00 +0800</pubDate><guid>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/</guid><description>Docker容器是近两年最 火的IT技术之一，用“火山爆发式“来形容Docker的成 长也不为过。Docker在产品服务的devops 运维、云 计算(CaaS)、大数据以及企业内部应用等领域正在被越来越多的接受和广泛应用。Docker技术的本质在于提升计算密度和提升部署效率，高屋 建瓴的讲，它的出现符合人类社会对绿色发展的追求，降低资源消耗，提升资源的单位利用率。不过经历了两年多的发展，Dock...</description></item><item><title>探讨Docker容器中修改系统变量的方法</title><link>https://tonybai.com/2014/10/14/discussion-on-the-approach-to-modify-system-variables-in-docker/</link><pubDate>Tue, 14 Oct 2014 00:00:00 +0800</pubDate><guid>https://tonybai.com/2014/10/14/discussion-on-the-approach-to-modify-system-variables-in-docker/</guid><description>探讨完Docker对共享内存状态持久化的支持状况后，我将遗留产品build到一个pre-production image中，测试启动是否OK。很显然，我过于乐观了，Docker之路并不平坦。我收到了shmget报出的EINVAL错误码，提示参数非法。 shmget的manual对EINVAL错误码的说明如下： EINVAL： A  new  segment  was  to  be  create...</description></item><item><title>探讨docker容器对共享内存的支持情况</title><link>https://tonybai.com/2014/10/12/discussion-on-shared-mem-support-in-docker/</link><pubDate>Sun, 12 Oct 2014 00:00:00 +0800</pubDate><guid>https://tonybai.com/2014/10/12/discussion-on-shared-mem-support-in-docker/</guid><description>我们的遗留系统广泛使用了性能最佳的IPC方式 – 共享内存，而且用到了两种共享内存的实现方式：System V共享内存(shmget、shmat、shmdt)以及Mmap映射Regular File。System V共享内存支持一定程度上的内存数据持久化，即当程序创建共享内存对象后，如果不显式删除或物理主机重启，该IPC对象会一直保留，其中的数据也不会丢 失；mmap映射Regular File的...</description></item><item><title>docker容器内服务程序的优雅退出</title><link>https://tonybai.com/2014/10/09/gracefully-shutdown-app-running-in-docker/</link><pubDate>Thu, 09 Oct 2014 00:00:00 +0800</pubDate><guid>https://tonybai.com/2014/10/09/gracefully-shutdown-app-running-in-docker/</guid><description>近期在试验如何将我们的产品部署到docker容器中去，这其中涉及到一个技术环节，那就是如何让docker容器退出时其内部运行的服务程序也 可以优雅的退出。所谓优雅退出，指的就是程序在退出前有清理资源（比如关闭文件描述符、关闭socket），保存必要中间状态，持久化内存数据 （比如将内存中的数据flush到文件中）的机会。docker作为目前最火的轻量级虚拟化技术，其在后台服务领域的应用是极其广泛的...</description></item><item><title>Ubuntu Server 14.04安装docker</title><link>https://tonybai.com/2014/09/26/install-docker-on-ubuntu-server-1404/</link><pubDate>Fri, 26 Sep 2014 00:00:00 +0800</pubDate><guid>https://tonybai.com/2014/09/26/install-docker-on-ubuntu-server-1404/</guid><description>近期在研究docker这一轻量级容器引擎，研究docker对日常开发测试工作以及产品部署运维工作能带来哪些便利。前些时候刚刚将工作环境从 Ubuntu搬到了Mac Air上，对Mac OS X的一切均不甚熟悉，给docker研究带来了不便，于是打算在VirtualBox中安装一Ubuntu Server作为docker之承载平台。这里记录一下安装配置过程，主要为了备忘，如果能给其他人带来帮助，我会...</description></item><item><title>为阻塞型函数调用添加超时机制</title><link>https://tonybai.com/2013/10/25/add-timeout-to-blocking-function-call/</link><pubDate>Fri, 25 Oct 2013 00:00:00 +0800</pubDate><guid>https://tonybai.com/2013/10/25/add-timeout-to-blocking-function-call/</guid><description>我们产品中的一个子模块在进行Oracle实时数据库查询时，常常因数据库性能波动或异常而被阻塞在OCI API的调用上，为此我们付出了“惨痛”的代价。说来说去还是我们的程序设计的不够完善，在此类阻塞型函数调用方面缺少微小粒度的超时机制。 调用阻塞多发生在I/O操作（磁盘、网络、低速设备）、第三方API调用等方面。对于文件/网络I/O操作，我们可利用在非阻塞文件描述符上select /poll的超时机...</description></item><item><title>关于编程语言学习的一些体会</title><link>https://tonybai.com/2013/10/22/some-experience-about-learning-programming-language/</link><pubDate>Tue, 22 Oct 2013 00:00:00 +0800</pubDate><guid>https://tonybai.com/2013/10/22/some-experience-about-learning-programming-language/</guid><description>_Learn at least one _new language every year_.                                               — Andy Hunt and Dave Thomas_ 自己一直是“每年学习一门新语言”的忠实拥趸，曾先后认真地学习了Haskell、Common Lisp、Python、Go等语言，对Prolog、Scala、...</description></item><item><title>Ubuntu 12.04修复记</title><link>https://tonybai.com/2013/08/07/ubuntu-12-04-repairing-notes/</link><pubDate>Wed, 07 Aug 2013 00:00:00 +0800</pubDate><guid>https://tonybai.com/2013/08/07/ubuntu-12-04-repairing-notes/</guid><description>今天一早发现Ubuntu 12.04坏掉了，于是用了大半天对其做了修复，修复过程十分坎坷，但结果还不错，遂记之以备忘。 **\* 毁掉Ubuntu** Ubuntu坏掉完全是由于我的错误决策。昨天一天Ubuntu桌面右上方的状态拦一直有一个红色的错误提示符，提示系统包冲突，建议执行sudo apt-get install -f解决。apt-get也提示索引冲突，无法卸载和安装任何包。于是执行了su...</description></item><item><title>再谈C语言位域</title><link>https://tonybai.com/2013/05/21/talk-about-bitfield-in-c-again/</link><pubDate>Tue, 21 May 2013 00:00:00 +0800</pubDate><guid>https://tonybai.com/2013/05/21/talk-about-bitfield-in-c-again/</guid><description>我在日常工作中使用C语言%E2%80%8E)中的位域(bit field)的场景甚少，原因大致有二： \* 一直从事于服务器后端应用的开发，现在的服务器的内存容量已经达到了数十G的水平，我们一般不需要为节省几个字节而使用内存布局更加紧凑的位域。 \* 结构体中位域的实现是平台相关或Compiler相关的，移植性较差，我们不会贸然地给自己造“坑”的。 不过近期Linux技术内核社区（www.linu...</description></item><item><title>也谈Commit log</title><link>https://tonybai.com/2013/05/09/also-talk-about-commit-log/</link><pubDate>Thu, 09 May 2013 00:00:00 +0800</pubDate><guid>https://tonybai.com/2013/05/09/also-talk-about-commit-log/</guid><description>在版本控制工具大行其道的今天，作为程序员，势必要每天与各种版本控制系统（比如Subversion、Git、Mercurial等）打交道， 每天不commit几次代码都不好意思说自己是专业程序员^\_^。不过commit代码可不止敲入commit命令这么简单，对于一个专业程序员 来说，我们还要关注每次commit所携带的背景信息，这里暂且称之为“commit context”。在每次commit时，...</description></item><item><title>玩转top</title><link>https://tonybai.com/2013/03/02/deep-into-top/</link><pubDate>Sat, 02 Mar 2013 00:00:00 +0800</pubDate><guid>https://tonybai.com/2013/03/02/deep-into-top/</guid><description>相信很多人和我一样，top是自己日常使用最多的linux资源查看工具。不过仅限于一些简单的日常场景罢了：敲入top命令，看看哪些进程占用 CPU较多，然后对这些CPU占用较多的进程逐一处理一下。显然这样使用top有些大才小用了。 以前在监控工具使用方面总是浅尝辙止，并未做过多深入研究。近来愈来愈觉得有必要针对几种常用工具好好学习一下了。而top便首当其冲。top是一款 以查看进程(task)信息为...</description></item><item><title>如何加入Linux内核开发社区(7)</title><link>https://tonybai.com/2012/04/09/how-to-participate-linux-community-section-7/</link><pubDate>Mon, 09 Apr 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/04/09/how-to-participate-linux-community-section-7/</guid><description>本文翻译自The Linux Foundation的《How to Participate in the Linux Community》(基于2012-03-21最新版本)，原作者为Jonathan Corbet(corbet@lwn.net)。 下面是该文章第七章、第八章以及第九章节的中译文。 **7、高级主题** 但愿此时此刻，你已经理解了内核开发过程是如何进行的。但仍然还有很多东西要学习！...</description></item><item><title>如何加入Linux内核开发社区(5)</title><link>https://tonybai.com/2012/04/05/how-to-participate-linux-community-section-5/</link><pubDate>Thu, 05 Apr 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/04/05/how-to-participate-linux-community-section-5/</guid><description>本文翻译自The Linux Foundation的《How to Participate in the Linux Community》(基于2012-03-21最新版本)，原作者为Jonathan Corbet(corbet@lwn.net)。 下面是该文章第五章节的中译文。 **5、发布补丁** 迟早有一天你的工作将提交到开发社区进行评审，并最终合入内核主线。不出所料，内核开发社区在发布补丁...</description></item><item><title>如何加入Linux内核开发社区(6)</title><link>https://tonybai.com/2012/04/05/how-to-participate-linux-community-section-6/</link><pubDate>Thu, 05 Apr 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/04/05/how-to-participate-linux-community-section-6/</guid><description>本文翻译自The Linux Foundation的《How to Participate in the Linux Community》(基于2012-03-21最新版本)，原作者为Jonathan Corbet(corbet@lwn.net)。 下面是该文章第六章节的中译文。 **6、将补丁工作进行到底** 此时此刻，你已经遵循了这里到目前为止给出的所有指导原则，并且由于你自己的工程技能，你已...</description></item><item><title>如何加入Linux内核开发社区(4)</title><link>https://tonybai.com/2012/03/31/how-to-participate-linux-community-section-4/</link><pubDate>Sat, 31 Mar 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/03/31/how-to-participate-linux-community-section-4/</guid><description>本文翻译自The Linux Foundation的《How to Participate in the Linux Community》(基于2012-03-21最新版本)，原作者为Jonathan Corbet(corbet@lwn.net)。 下面是该文章第四章节的中译文。 **4、正确地编写代码** 关于那个可靠的面向社区的设计过程我们已经说的够多了，任何内核开发项目的证据都是最终的代码。...</description></item><item><title>如何加入Linux内核开发社区(3)</title><link>https://tonybai.com/2012/03/29/how-to-participate-linux-community-section-3/</link><pubDate>Thu, 29 Mar 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/03/29/how-to-participate-linux-community-section-3/</guid><description>本文翻译自The Linux Foundation的《How to Participate in the Linux Community》(基于2012-03-21最新版本)，原作者为Jonathan Corbet(corbet@lwn.net)。 下面是该文章第三章节的中译文。 **3、早期规划** 当考虑一个Linux内核开发项目时，人们可能很想尽快投入并开始编码。但和任何重要的项目一样，推动...</description></item><item><title>如何加入Linux内核开发社区(2)</title><link>https://tonybai.com/2012/03/28/how-to-participate-linux-community-section-2/</link><pubDate>Wed, 28 Mar 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/03/28/how-to-participate-linux-community-section-2/</guid><description>本文翻译自The Linux Foundation的《How to Participate in the Linux Community》(基于2012-03-21最新版本)，原作者为Jonathan Corbet(corbet@lwn.net)。下面是该文章第二章节的中译文。 **2、内核开发过程是如何进行的** 在20世纪90年代初，当时的Linux内核开发是一件非常松散的事情，涉及的用户和开...</description></item><item><title>如何加入Linux内核开发社区(1)</title><link>https://tonybai.com/2012/03/27/how-to-participate-linux-community-section-1/</link><pubDate>Tue, 27 Mar 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/03/27/how-to-participate-linux-community-section-1/</guid><description>本文翻译自The Linux Foundation的《How to Participate in the Linux Community》(基于2012-03-21最新版本)，原作者为Jonathan Corbet(corbet@lwn.net)。下面是该文章第一章节的中译文。 **1、内核开发过程指南** 本文旨在帮助那些在参与开发社区(community)工作过程中遭遇些许挫折的开发人员(以及...</description></item><item><title>也谈Linux Kernel Hacking – Kconfig与Kbuild</title><link>https://tonybai.com/2012/03/18/linux-kernel-hacking-series-kconfig-and-kbuild/</link><pubDate>Sun, 18 Mar 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/03/18/linux-kernel-hacking-series-kconfig-and-kbuild/</guid><description>**_挖掘简单现象背后的复杂本质。_**– Tony Bai^\_^ 上文讲到Linux Kernel的配置和编译十分简单，甚至简单到可以与一个用户层应用相媲美。这一切都是因为Linux Kernel实现了一套易于使用、变更和后期维护的配置和编译体系。要知道最新Linux Kernel版本的代码量可是千万级别的，并且模块众多，其背后的配置和编译体系一定不那么简单，这次我们就来尝试Hack一下这套体...</description></item><item><title>也谈Linux Kernel Hacking – 内核配置、编译与安装</title><link>https://tonybai.com/2012/03/15/linux-kernel-hacking-series-kernel-config-compile-and-install/</link><pubDate>Thu, 15 Mar 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/03/15/linux-kernel-hacking-series-kernel-config-compile-and-install/</guid><description>_**Linux Kernel之于C程序员，就好比世界之巅珠穆朗玛之于专业登山客。**_ — Tony Bai^\_^ 作为到目前为止最为成功的开源项目，Linux Kernel总是散发着无穷的魅力，就好比那珠穆朗玛，让人魂牵梦绕，心潮澎湃并总是想尝试征服。 记得2006年初我曾花了些时间研究Linux Kernel，但后来迷失在了Linux Kernel引导阶段，无法自拔，最终选择了&amp;#34;知难而退&amp;#34;...</description></item><item><title>回顾TCP协议那些事儿</title><link>https://tonybai.com/2007/12/06/review-tcp-protocol/</link><pubDate>Thu, 06 Dec 2007 00:00:00 +0800</pubDate><guid>https://tonybai.com/2007/12/06/review-tcp-protocol/</guid><description>我不是计算机科班出身。记得大学的时候旁听计算机系的网络课，当时计算机系使用教材是&amp;#34;计算机网络–自顶向下方法与Internet特色&amp;#34;的影印版，这本教材与众不同的一个地方就是作者JAMES F.KUROSE和KEITH W.ROSS采用了&amp;#39;自顶向下&amp;#39;的编排思路，先从应用层开始，最后讲到物理层。而且这本书在语言上形象生动，通俗易懂。只怪我当初没有一心一意听讲，到现在存在我的脑子中的基本概念居多，深刻理解...</description></item><item><title>Kernel 'head.S'</title><link>https://tonybai.com/2006/03/02/kernel-head/</link><pubDate>Thu, 02 Mar 2006 00:00:00 +0800</pubDate><guid>https://tonybai.com/2006/03/02/kernel-head/</guid><description>After being decompressed, the kernel image starts with another ‘startup\_32′ function included in $(linux-2.6.15.3\_dir/arch/i386/kernel/head.S’. This ‘head.S’ is the second one in linux source packag...</description></item><item><title>Compressed 'head.S'</title><link>https://tonybai.com/2006/02/25/compressed-head/</link><pubDate>Sat, 25 Feb 2006 00:00:00 +0800</pubDate><guid>https://tonybai.com/2006/02/25/compressed-head/</guid><description>_Why do we do this? Don’t ask me.. Incomprehensible are the ways of bootloaders. _                             — comments in arch/i386/boot/compressed/misc.c There are two ‘head.S’ in linux source pac...</description></item><item><title>Transfer to '32-bit'</title><link>https://tonybai.com/2006/02/17/transfer-to-32bit/</link><pubDate>Fri, 17 Feb 2006 00:00:00 +0800</pubDate><guid>https://tonybai.com/2006/02/17/transfer-to-32bit/</guid><description>The phase we talked about before is in ‘Real-address Mode’, which runs 16-bit program modules. At the tail of &amp;#34;Begin ‘setup.S’&amp;#34;, we had moved to ‘Protected Mode’, which usu runs 32-bit program modules...</description></item><item><title>Outline 'memory layout'</title><link>https://tonybai.com/2006/02/15/outline-memory-layout/</link><pubDate>Wed, 15 Feb 2006 00:00:00 +0800</pubDate><guid>https://tonybai.com/2006/02/15/outline-memory-layout/</guid><description>So far we have arrived at the gate leading to the real kernel. And we’d better stop for a short break in order that we would have more energy to go ahead. Now let’s examine what we do to memory these ...</description></item><item><title>Begin 'setup.S'</title><link>https://tonybai.com/2006/02/13/begin-setup/</link><pubDate>Mon, 13 Feb 2006 00:00:00 +0800</pubDate><guid>https://tonybai.com/2006/02/13/begin-setup/</guid><description>It is time for ‘setup.S’ to show its power. The ‘setup.S’ is loaded by the bootloader and virtually it belongs to neither the ‘bootstrap’ routine nor the kernel program, although it is a portion of th...</description></item><item><title>Goto 'Bootstrap'</title><link>https://tonybai.com/2006/02/11/goto-bootstrap/</link><pubDate>Sat, 11 Feb 2006 00:00:00 +0800</pubDate><guid>https://tonybai.com/2006/02/11/goto-bootstrap/</guid><description>The term ‘Bootstrap’, which originally refers to a person who tries to stand up by pulling his own boots, refers to a subroutine used to establish the full routine(its own left part, i think) or anoth...</description></item><item><title>Inside the 'i386'</title><link>https://tonybai.com/2006/02/09/inside-the-i386/</link><pubDate>Thu, 09 Feb 2006 00:00:00 +0800</pubDate><guid>https://tonybai.com/2006/02/09/inside-the-i386/</guid><description>The term ‘i386′ in the title does not refer to the real Intel 80386 processor but the representative of Intel 32-bit architecture(IA32). I prefer ‘i386′ rather than ‘IA32′ just like what the linux ker...</description></item><item><title>Retired 'bootsect.S'</title><link>https://tonybai.com/2006/02/08/retired-bootsect/</link><pubDate>Wed, 08 Feb 2006 00:00:00 +0800</pubDate><guid>https://tonybai.com/2006/02/08/retired-bootsect/</guid><description>We know that the latest linux kernel version is 2.6.x, which is different from the ‘old kernels’ in booting. The ‘bootsect.S’, which used to make the kernel image in the floppy disk bootable in the ea...</description></item><item><title>差异学习</title><link>https://tonybai.com/2005/12/13/differences-in-learning/</link><pubDate>Tue, 13 Dec 2005 00:00:00 +0800</pubDate><guid>https://tonybai.com/2005/12/13/differences-in-learning/</guid><description>看了dreamhead的那篇“差异程序员”，又恰逢在今天dreamhead在一封邮件中谈到其继续深入“向下学习”的想法，心里突然有了本篇题目这样的一个话题。 “差异程序员”(http://dreamhead.blogbus.com/logs/2005/12/1676755.html) 最近自己也在“向下走”，这和dreamhead的想法和做法不谋而合。dreamhead在其blog和邮件中都谈了其...</description></item></channel></rss>