TI论坛
直播中

李林

7年用户 1216经验值
私信 关注

用L138,ARM侧linux写入ssd,测试速度只有不到2MB/s(100MB/64s),可能是什么原因?

本帖最后由 一只耳朵怪 于 2018-6-22 09:26 编辑

大家好。我们用L138,ARM侧linux写入ssd,测试速度只有不到2MB/s(100MB/64s),可能是什么原因?读取速度也慢。
系统:2.6.32,uboot 2009
ssd文件系统, fat32
每次写入16kB
  1. int ARMOR_SaveData2Sata(const char* dataBuf)
  2. [
  3. int dataBytes = 0;
  4. int retVal = ARMOR_TRUE;
  5. pCPUinfo pInfo = getCPUinfo();
  6. ARMOR_CFG_T * pstCfg = GetConfigGlobal();
  7. //ARMOR_initSata(dataBuf, len);

  8. if (pInfo->sataStartFlag == ARMOR_TRUE)
  9. [
  10. if (1)
  11. [
  12. if (pInfo->sataFrameNum == 0)
  13. [
  14. if(pInfo->sataFp != NULL)
  15. [
  16. fclose(pInfo->sataFp);
  17. pInfo->sataFp = NULL;
  18. ]
  19. get_time(pInfo->sataFilename);
  20. /* Open the output file */
  21. pInfo->sataFp = fopen(pInfo->sataFilename, "ab+");
  22. if (pInfo->sataFp == NULL)
  23. [
  24. ARMOR_TRACE("Failed to open input file: %sn", pInfo->sataFilename);
  25. pInfo->sataStartFlag = ARMOR_FALSE;
  26. return ARMOR_FALSE;
  27. ]
  28. ]

  29. if (pInfo->sataFp != NULL)
  30. [
  31. dataBytes = fwrite(dataBuf, PCM_STORE_LEN, 1, pInfo->sataFp);
  32. ]

  33. pInfo->sataFrameNum++;
  34. if ((pInfo->sataFrameNum & 0x0ff ) == 0)
  35. [
  36. ARMOR_TRACE ("fileName:%s, dataBytes=%d, frameNum=%dn", pInfo->sataFilename, PCM_STORE_LEN, pInfo->sataFrameNum) ;
  37. ]
  38. if (pInfo->sataFrameNum >= pstCfg->stSata.recTime*PCM_FRAME_PER_SEC)
  39. [
  40. ARMOR_TRACE ("fileName:%s, dataBytes=%d, frameNum=%d last onen", pInfo->sataFilename, PCM_STORE_LEN, pInfo->sataFrameNum) ;
  41. //pInfo->sataStartFlag = ARMOR_FALSE;
  42. pInfo->sataFrameNum = 0;

  43. /* Close the input file */
  44. fclose(pInfo->sataFp);
  45. pInfo->sataFp = NULL;
  46. ]
  47. ]
  48. ]
  49. else if (pInfo->sataFp != NULL)
  50. [
  51. pInfo->sataFrameNum = 0;
  52. fclose(pInfo->sataFp);
  53. pInfo->sataFp = NULL;
  54. ]
  55. return retVal;
  56. ]

回帖(1)

王山崎

2018-6-21 17:36:04
可以看看官方测试数据
http://processors.wiki.ti.com/index.php/DaVinci_PSP_03.20.00.12_Device_Driver_Features_and_Performance_Guide?keyMatch=omap-l138%20sata%20performance&tisearch=Search-EN#Performance_Benchmarks_11
举报

更多回帖

发帖
×
20
完善资料,
赚取积分