快速移植 OpenHarmony Linux 内核到三方 ARM64 平台

官方的文档我觉得是最终的产品形态,一个新品在开发移植过程中不太可能一步到位,尤其是非官方支持版本,所以多少还是要拆分下。 准备整体构建环境1 准备代码 理论上path不是问题,只要找到就好。这里就把要用的三方内核,比如我的是Linux-5.4就放到Linux目录下。 tj@ubuntu:~/code/oh-3.2.2/kernel/linux$ lsbuil...

阅读全文

初识 OpenHarmony Linux Kernel

先看技术架构: 既然 OH 是多内核设计,那必然会有个抽象层(KAL)统一接口供上层使用,还多了个 HDF 驱动框架,官方的引入考虑: How to smoothly adapt device drivers to different kernels on the same hardware and minimize the workloads on d...

阅读全文

What Android GKI Brings to OEMs

After reading the Android documentation on General Kernel Image (GKI), i have gained an understanding of what it means for OEMs. We know every OEM could modify the Linux kernel in ...

阅读全文

转:EROFS pcluster 模式分析

原文链接:https://mp.weixin.qq.com/s/PQb_PwgxzyeeFZyz3FsO6w EROFS pluster 模式的用处: It’s used to judge whether inplace I/O can be used due to the current status of pclusters in the c...

阅读全文

为什么 WQ_CPU_INTENSIVE 对 unbound 工作队列没有意义

问题如题,Linux workqueue 文档在描述 WQ_CPU_INSTENSIVE 时提到: This flag is meaningless for unbound wq. 为什么这样说?本文尝试去解读这个标记。 unbound wq 就是 WQ_UNBOUND: WQ_UNBOUND Work items queued to an unbo...

阅读全文

如何使 bpftrace:runqlat.bt 按 workqueue name 统计延迟

问题当我们想利用 ebpf 统计 task/kworker 的调度延迟,通常有两个前端选择,一是 bcc,另一个是 bpftrace。而如果要自定义,通常选择先上手 bpftrace,因为简单。 bpftrace/tools 下的工具 runqlat.bt 就可以统计调度延迟,只不过输出是直方图,我们希望能够像 perf sched 那样...

阅读全文

如何使 perf sched 支持 workqueue name

问题workqueue name 就是 alloc_workqueue 的第一个参数: /** * alloc_workqueue - allocate a workqueue * @fmt: printf format for the name of the workqueue[...]#define alloc_workqueue(fmt, flags,...

阅读全文

使用 adeb 在 Android 上编译安装 bcc

先科普下 BCCBCC 官方: BCC is a toolkit for creating efficient kernel tracing and manipulation programs, and includes several useful tools and examples. It makes use of extended BPF (Ber...

阅读全文

kworker 调度延迟性能测试和统计

LPC2022 EROFS 提到一个解压调度延迟问题: 最近,Android 提了一笔优化 patch for this issue: Author: Sandeep Dhavale <dhavale@google.com>Date: Thu Dec 22 01:15:29 2022 +0000 EROFS: Replace erof...

阅读全文

转:EROFS 碎片去重实践

碎片去重已经实现了,参见 [PATCH v7] erofs-utils: mkfs: support fragment deduplication,其主要逻辑就是在压缩前去重以防把重复的部分写入 packed inode,去重成功后如果 pcluster 没压满,就再读碎片尝试修复。 主要围绕查找碎片、何时修复碎片、开始修复碎片、生成碎片extent、提交碎...

阅读全文