View topic - QNX6 filesystem compatibility with SD technology?

QNX6 filesystem compatibility with SD technology?

anything that doesn't fit to other groups.

QNX6 filesystem compatibility with SD technology?

Postby _KB_ » Mon Feb 03, 2020 4:21 pm

Disclaimer: not sure if this is the right section. If not, feel free to move the topic.

Hi,

This a general question regarding QNX6 filesystem compatibility with SD card.
So far I have this product with a 4-GB SD Card (SDHC) and a Power-Safe filesystem (fs-qnx6.so) which works OK (reaching the end of developement phase).

However I've recently read something which bothers me.

The wikepedia article on SD card reads:
Per the SD card specification, an SD card is formatted with MBR and the following file system:
[...]
For SDHC cards:
Capacity of less than 16,450,560 logical sectors (smaller than 7.8 GB): FAT32 with partition type 0Bh and EBPB 7.1
[...]
Risks of reformatting
Reformatting an SD card with a different file system, or even with the same one, may make the card slower, or shorten its lifespan. Some cards use wear leveling, in which frequently modified blocks are mapped to different portions of memory at different times, and some wear-leveling algorithms are designed for the access patterns typical of FAT12, FAT16 or FAT32.[125] In addition, the preformatted file system may use a cluster size that matches the erase region of the physical memory on the card; reformatting may change the cluster size and make writes less efficient. The SD Association provides freely-downloadable SD Formatter software to overcome these problems for Windows and Mac OS X.[126]


I'm not sure to fully understand the consequences in my case (not quite an expert on SD technology ... besides, not a native speaker).
Anyway, I've formatted my sd card on a QNX OS. Obviously I didn't use the official SD formatter, as I wasn't aware of its existence, but I guess QNX filesystem is not included in the tool.
The product contains embedded software and we expect wear-leveling in order to increase SD lifespan.

Anyone with the same requirements (QNX + wear leveling + SD card) ?
What's your opinion on my question?

Thanks.
_KB_
Active Member
 
Posts: 42
Joined: Mon Oct 15, 2012 6:36 pm

Re: QNX6 filesystem compatibility with SD technology?

Postby nico04 » Tue Feb 04, 2020 8:36 am

Hi,

I use a SD card on some products without problem.

In my products, the SD card is QNX6 formatted. I don't take care of the flash partitioning alignment. Not sure this is possible with QNX6fs. However, The SD card is used to store device applications and configuration. So, there is not much data written to it.
If you are interested in power-fail-safe functionality of qnx6fs, be careful that's it works only when your SD card is power-fail-safe capable. Most SD cards are not.

I also use secondary SD card slot for storing/reading user data (big amounts of data). On this slot, SD cards are FAT32 formatted. I tried formatting the SD cards with QNX utility and with SD card association utility (on a Windows PC). There is a difference in throughput. More important is the size of write chunks made by your application. When your application writes small chunks of data, SD card write speed is (very) low.
Testing write speed is complex. It depends on application write chunk size, filesystem cache size/management, filesystem alignment on flash sectors...
One important parameter to consider is that when the SD card is brand new, writing to it is fast since of flash sectors are empty. This means no need to erase flash sectors before writing data. Once all flash sector have been written once, SD card controller has to erase flash sectors before writing data. Then you get a much slower write speed.
There is a special function to mitigate the speed loss : TRIM. The filesystem much be compatible with this functionnality. The SD card must also be compatible. Most are not.
On my devices I get the following message : "fs-qnx6: trim was requested, but is NOT usable."

Wear levelling : All current media manage wear levelling. This is the responsibility of the SD card controller to manage wear levelling. However, it is possible to reduce flash wearing, by using a filesystem made for this : exFAT. When using FAT32, correctly formatting can help.

Nicolas

PS : My devices run QNX6.6.0
nico04
Senior Member
 
Posts: 171
Joined: Wed Sep 29, 2010 9:59 am
Location: France

Re: QNX6 filesystem compatibility with SD technology?

Postby _KB_ » Mon Feb 10, 2020 1:14 pm

Sorry for the late answer.
Thanks for the useful information!
_KB_
Active Member
 
Posts: 42
Joined: Mon Oct 15, 2012 6:36 pm


Return to General Programming

Who is online

Users browsing this forum: No registered users and 3 guests