关于MMC/CD usb storage 设备大量传输出现内核崩溃的解决办法

来源:互联网 发布:uipath 国内类似软件 编辑:程序博客网 时间:2024/06/08 06:10

最近调试sd卡问题 ,出现一个问题:在卡内处理大量数据时(如运行cp或者tar)出现内核崩溃,搜很多网站都不行。最后考虑是不是虚拟内存不足造成的 。清一下内存 果然凑效。运行如下:

while true ; do echo 3 > /proc/sys/vm/drop_caches ; sleep 1 ; done & 

   有关解释可以参考下面

 有关/proc/sys/vm/drop_caches的用法如下:

  Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.

? 
1
2
3
4
5
6 ##To free pagecache:
echo 1 > /proc/sys/vm/drop_caches
##To free dentries and inodes:
echo 2 > /proc/sys/vm/drop_caches
##To free pagecache, dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches

  As this is a non-destructive operation and dirty objects are not freeable, the user should run `sync’ first.


原创粉丝点击