Hi Jerry, I am not sure if you have tried the below algorithm successfully with O_DIRECT. But what O_DIRECT needs is "Soft-block aligned" buffer on not Byte-aligned.
In the alternative you have mentioned, I understand that it is without O_DIRECT. If that's the case, I will try it out for sure, also with higher chunk-sizes. Regards, Gopal Sukumar. Jerry Johns wrote: if you're trying to align malloc'ed memory to an x-byte boundary, you can try to do this: e.g, aligning to a 2-byte boundary, unaligned_addr = malloc(size + 0x3); aligned_addr = ((unaligned_addr+0x3) & (~0x3)); This should allow you to request the maximum possible size, and then allow you to increment your unaligned address up to its proper alignment (all within your malloc'ed space) You'd still try to free from the unaligned addr though; As for alternative methods to speeding up your filesystem writes, I've done some testing on write speeds, and noticed that writing in higher volume chunks significantly boosted by speeds I usually write in 8K chunks, but you should experiement with other sizes as well. Thanks, Jerry Johns Design Engineer Nuvation Research Corp - Canada Tel: (519) 746-2304 ext. 221 www.nuvation.com<http://www.nuvation.com> ________________________________ _______________________________________________ Davinci-linux-open-source mailing list [email protected]<mailto:[email protected]> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. E-mail may contain viruses. Before opening attachments please check them for viruses and defects. While MindTree Limited (MindTree) has put in place checks to minimize the risks, MindTree will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. MindTree reserves the right to monitor and review the content of all messages sent to or from MindTree e-mail address. Messages sent to or from this e-mail address may be stored on the MindTree e-mail system or else where. ________________________________ http://www.mindtree.com/email/disclaimer.html
_______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
