This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Performance of BIOS/PSP Block Media driver



Hi,

I am sing BIOS PSP (pspdrivers_01_30_01) Block Media driver to read and write SATA HDD in RAW mode. I am surprised with low performace of block media driver. I am writing 16K bytes to SATA HDD at regular interval of 2.5 ms using pDevOps->Blk_Write API.I observed that this write API call returns only after ~300usec and in between somwtimes it returns only after ~1.2 msec. I would appreciate if somebody let me know how to improve this writing time, also why it takes 1.2 msec in between. 

Regards,

Chandra 

  • Chandra,

    If you refer the document "C6748_BIOSPSP_Datasheet.pdf" in the 1.30.01 release package, it will point you the throughput meassured fro various buffer length.

    If i understand correctly, the write API sometime completes in 300usec and sometimes it takes 1.2 msec. You want to know why this randomness is there? Am i right?

    Everytime are you writting to the same sector or different sectors?

    Are you using any other thread/peripheral in your application. What is the task priority of the application? 

    Regards,

    Sandeep K

  • Hi Sandeep,

    Yes, I wanted to know the random behavior of writing time for same buffer size. If you see the throughpt data from "C6748_BIOSPSP_Datasheet.pdf" it should not take that much time. This is troubling becoz I need to continously write to HDD periodically for long duration but due to its random behaviour  it misses data in between.

    My application  writes to  HDD to continuous sectors i.e different sectors. Also, application has only one thread of priority 1 which does this write operation.

    Also, I have one more doubt that as we are using EDMA for write/read operation , Blk->write should return immediately and callback should return once operation is completed But this is not the case. I can see the correct and consistent behaviour with UPP driver.

    Thanks & Regards,

    Chandra Shekhar Mishra

  • Hi Chandra Shekhar,

    Is it possible to reduce the application priority to 5/10 and try?

    How are you measuring the time taken for the read/write operation?

    Have you tried with different HDD? Are all giving the same result?

    Thanks and Regards,

    Sandeep K

     

  • Hi Sandeep,

     By making the application priority to 5/10, application is not able to register media itself to proceed further. I am measuring the time by toggling the GPIO and probing with oscilloscope. I tried with different HDD but of same make.

    Regards,

    Chandra

  • Hi Sandeep,

    I tried putting break point in BlkMedia.c file and found that Blk->Write call calls blkMediaWriteAsync  function and it jumps to the line no 2113,2136,2143 and 2238. It seems it doesn't go for Buffer Alignment. Could you please check it once.

    Regards,

    Chandra

  • Chandra,

    After having couple of discussion with you, the summary is,

    1.   The issue is, sometimes the SATA HDD is taking more time in completing the I/O. Because of which the blocked application will end up in data corruption. Since HDD internally uses different types of algorithms and also mechanical moment will be there while writing the data to the HDD, it might take more time, during some of the I/O and this is inevitable. 

     

    2.   To resolve the issue of application getting corrupted data because fo the blocking, the blockmedia has to be made asynchronous, so that, the application will not be blocked for the completion of the I/O.

     

    Thanks and Regards,

    Sandeep k