2012年2月23日

make_request函数中的一个bug

摘要: 110repeat: 111/* we don't allow the write-requests to fill up the queue completely: 112 * we want some room for reads: they take precedence. The last third 113 * of the requests are only for reads. 114 */ 115 if (rw == READ) 116 req = request+NR_REQUEST; 117 else 118 ... 阅读全文

posted @ 2012-02-23 22:01 杰特实验室 阅读(461) 评论(0) 推荐(0) 编辑

lock_buffer函数引发的思考

摘要: 42 static inline void lock_buffer(struct buffer_head * bh) 43 { 44 cli(); 45 while (bh->b_lock) 46 sleep_on(&bh->b_wait); 47 bh->b_lock=1; 48 sti(); 49 }摘自kernel/blk_drv/ll_rw_blk.c本篇文章主要讨论一下此函数有没有必要关闭中断。Linux 0.11内核在内核态是不可抢占的,因为时钟中断的处理过程中发现被打断的执行序列正处在内核中,则不引发进程切换,也就是仍然返回原来的... 阅读全文

posted @ 2012-02-23 18:40 杰特实验室 阅读(702) 评论(1) 推荐(0) 编辑

导航