git 多仓库版本控制 从官方仓库fork了一个仓库,但是想要做自己的修改 获取项目代码: git clone <official_repo_url> 增加个人上游仓库: git remote add <remote_name> <git_url> 重命名: git remote rename <old_name> <new_name> 2025-07-27 utils #git
ubuntu setup 替换repo源清华源 删除snap123456789101112131415161718# snap listsnap remove --purge gnome-42-2204snap remove --purge gtk-common-themessnap remove --purge snap-storesnap remove --purge snapd-desktop-integration 2025-07-19 ubuntu #ubuntu
quirk macro 知乎问题:Linux kernel中有哪些奇技淫巧 有感 container_of 根据成员变量地址求结构体首地址 文件位置:include/linux/container_of.h 12345678910111213141516#define typeof_member(T, m) typeof(((T*)0)->m)/** * container_of - ca 2025-07-12 linux #linux #kernel 6.15
mwait mwait 指令 A hint that allows the processor to stop instruction execution and enter an implementation-dependent optimized state until occurrence of a class of events.MWAIT instruction provides hints to 2024-11-24 linux #linux #kvm
bond mux machine状态机变化 LACP_Activity: 端口在链路控制中的主从状态,0表示Passive, 1表示Active。 LACP_Timeout: 超时时间,0表示长超时,1表示短超时 Aggregation: 表示端口的聚合能力。 TRUE(1)表示链路是可聚合的,FALSE(0)表示链路是独立链路,不可聚合 Synchroniza 2024-08-16 linux #linux #bond
kvm_init kvm_init 函数 确定有多少个CPU:num_cpus[SMP, hotpluggable] KVMParkedVcpu { vcpu_id, kvm_fd } 列表记录vcpu 检查KVM版本 kvm创建虚机,返回一个fd:kvm_ioctl(s, KVM_CREATE_VM, type); 2024-07-17 qemu #kvm #qemu
VCPU Hotplug 热插vcpu主要流程hotpluggable配置缺省值qemuDomainAttachDeviceqemuDomainAttachDeviceFlagsqemuDomainAttachDeviceLiveAndConfigqemuDomainAttachDeviceConfigvirDomainDefPostParsevirDomainDefPostParseCommonvirDomainVcpu 2024-03-13 libvirt #libvirt #hotplug #vcpu
libvirt event Event 事件机制事件注册virEventRegisterDefaultImpl 基于 poll 的事件注册 必须使用 virEventRunDefaultImpl 来处理事件 注册Event的方法 virevent.c|– virEventGLibRegisterOnce|– virEventRegisterImpl: 注册了 HandleAdd、HandleUpdate、HandleRem 2024-02-27 libvirt #libvirt #event
Memory Hotplug 热插内存主要流程注册 callbackvirConnectDomainEventRegisterAny|– qemuConnectDomainEventRegisterAny |– virDomainEventStateRegisterID(conn, driver->domainEventState, …) |– virObjectEventStateRegisterI 2024-02-27 libvirt #libvirt #hotplug #memory
xv6 环境配置gdb xv6启动第一个进程 entry.S 从 _entry 开始运行xv6,此时虚拟地址直接映射到物理地址 kernel.ld 将 xv6内核加载到 0x80000000,0x0~0x80000000 包含IO设备 设置栈(用于运行c代码),stack0在start.c文件中声明 执行 start.c 中的 start() start.c 修改运行模式为 Machine 模式 2023-12-23 os #os