"write through" mode of emmc

Hi,

This is not a specific question for a Nano, but in general about Tegra platforms.

Is there anything like a “write through” mode of an embedded emmc storage?

It could be a ridiculous question because it would make an emmc not usable in terms of performance.

But I wondered if such an option is available or not when it comes to a preparation for a sudden-power-loss catastrophe.

Thanks,
Takenori

Hi Takenori,

Disabling device cache could have impact on the overall performance, hence not recommended.
Having said that, time critical applications can still opt for DIRECT_O based on the requirement.
If you do not need high performance, we could provide a patch disabled device cache for you to do the test and triage if still required.

Thanks for you answer.

So, could you provide us with such a patch with O_DIRECT, and I guess together with O_SYNC?

The patch for the latest L4T 32.3.1 is fine.

Hi TakenoriSato,

The change has to be done in the application itself where the file is opened.

http://man7.org/linux/man-pages/man2/open.2.html

open( **const char *** pathname , int flags , mode_t mode )

Flags field in the above function should be set to the desired mode of operation.
For your case, this would be O_DIRECT | O_SYNC.

The change has to be done in the application itself where the file is opened.

I see. Understood that there is no such option to enable write-through mode globally.