This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: blib node allocation problem with FAT FS


On Wed, Feb 27, 2008 at 09:06:42AM -0500, Steve West wrote:
Hi all,
   I am having some problems with blib node allocation. It seems that the
number of unique file names is controlled by node pool size. If I set
NODE_POOL_SIZE to 32k and then open and close 32k unique named files I
get a file open failure around 32k files. Any ideas?

Could you produce a little test case which demonstrates the problem? If you follow the usual test case style i will include it as a standard test so that once we have the problem fixed we can also use it for regression testing.

I found the problem. The reference count was decrementing below 0. Here is a fix for fatfs_node_unref() in fatfs_ncache.c.

 if (node->refcnt)
       node->refcnt--;

I also found that if you change the 512 to 32768 (sector size) in fatfs.c call to cyg_blib_io_create() you get a 50% - 60% increase in disk throughput, especially with large files. (driver reads writes clusters not sectors)

Steve


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]