This is the mail archive of the ecos-discuss@sources.redhat.com 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]

About jffs2


Mr. Larmour,
    Sorry for havn't expressed clearly. I mean when
mounting. This is the bottleneck time. During this
period, all jffs2_raw_node_ref, jffs2_inode_cache,
jffs2_scan_info, jffs2_full_dnode, jffs2_full_dirent
are exist at the same time. Till
jffs2_build_inode_pass1 function, it will begin to
free memory.

If the flash size is 2M, 64K per block, 32 blocks
total. And all files are directories(all deletion
directories is even worse, but I will not discuss it
now. The result data below will be less than 2M).
Suppose 5 blocks are reserved for garbage collect, and
only 26 blocks are full.
(26 * block size - 26 * clean marker node) /
(jffs2_raw_dirent + jffs2_raw_inode + filename
len)=12526B(about)

every file using memory size when mount:
jffs2_inode_cache+jffs2_scan_info+jffs2_full_dirent+jffs2_full_dnode+jffs2_tmp_dnode_info+jffs2_raw_node_ref*2
= 132B(about)

So all memory: 12526 * 132 = 1.57MB(about)
And other global variable should be considered :
including crc table, read_write_buffer, gc_buffer,
superblock's jffs2_erase_blocke list, etc. 

This is the worst case. But how can I get the
threshold? And how about a 8M flash??? 16M???

No matter what, every raw node in flash has a
jffs2_raw_node_ref in memory, it is the main design. I
am so worry about it.

What is your opinion? Thank you very much!

guxm

_________________________________________________________
Do You Yahoo!? 
"用雅虎搜索,找到关于奥斯卡的一切"
http://cn.search.yahoo.com/search/cn?p=%b0%c2%cb%b9%bf%a8

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


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