- 论坛徽章:
- 0
|
下面的文字是 LDD3 里面的:
If the circular buffer fills up, printk wraps around and starts adding new data to the beginning of the buffer, overwriting the oldest data. Therefore, the logging process loses the oldest data. This problem is negligible compared with the advantages of using such a circular buffer. For example, a circular buffer allows the system to run even without a logging process, while minimizing memory waste by overwriting old data should nobody read it. Another feature of the Linux approach to messaging is that printk can be invoked from anywhere, even from an interrupt handler, with no limit on how much data can be printed. The only disadvantage is the possibility of losing some data.
(1) even from an interrupt handler
-------------------------------------------
这句话的意思就是:
interrupt handler 里面一般都会上锁(spinlock),那就是说即使在上锁(spinlock)后,printk 也是可以使用的?
(2) The only disadvantage is the possibility of losing some data
--------------------------------------------
这句话的意思不太明白,麻烦大家指点下. tks. |
|