본문 바로가기

"Buddy" in Linux 일반적으로 Buddy라고 하면 친구를 뜻한다. 하지만 리눅스에서는 조금 다르다. Buddy candidates are cache hot Consider buddies to be cache hot, decreases the likelyness of a cache buddy beging migrated away, increases cache locality : 버디들은 캐시 핫으로 생각되고, migration이 되는 것을 줄이고, 캐시 locality를 늘린다. 즉 캐시를 공유하는 task를 버디로 묶는 듯 하다. 이런 buddy logic은 task_hot() 함수에서 사용된다. 즉 task가 cache-hot이라고 생각되는지 여부를 판단하는데 사용된다. /* * Is this task likely cac.. 더보기
"all_pinned logic" in Linux all_pinned 변수는 현재 migrate하려는 task가 migrate하려는 this_cpu로 옮겨질 수 없을 때, (p의 allowed_cpus에 this_cpu가 해당하지 않을 때) 1로 유지가 되고, 이 경우 load_balance()에서 out_balanced: 로 goto해서 task migration이 이뤄지지 않는다. 즉 all_pinned가 set되어있다는 것은 옮기려는 task가 옮겨지려는 대상의 cpu로 갈 수 없음을 뜻한다. If "all_pinned" flag is set, then the task cannot be migrated to the target CPU, (due to "allowed_cpus" in task_struct) static int can_migrate_t.. 더보기
linux-2.6.24에서 linux-2.6.32로 porting하기 (dec_load(), ) linux-2.6.24에서 linux-2.6.32로 포팅을 하다보니 dec_load() 함수가 사라졌다. 24버젼에서 이 함수는 해당 rq의 load를 task의 weight 만큼 빼는 함수이다. 즉 rq에서 task를 뺀 후에 rq의 load를 update하기 위해서 불린다. static inline void dec_load(struct rq *rq, const struct task_struct *p) { update_load_sub(&rq->load, p->se.load.weight); } static inline void update_load_sub(struct load_weight *lw, unsigned long dec) { lw->weight -= dec; } linux-2.6.32 에서는 d.. 더보기
CFS(completely fair scheduler) vs DWRR(distributed weighted round robin) Ingo Molnar와 Li, Tong N과의 대화 http://kerneltrap.com/mailarchive/linux-kernel/2007/7/23/120562/thread#mid-120562 흥미로운 대화임에는 분명하다. 더보기