Mercurial > yaffs-ecoscentric
changeset 303:ed45fbf83981
Make YAFFS_N_TEMP_BUFFERS a configurable parameter.
| author | Ross Younger <wry@ecoscentric.com> |
|---|---|
| date | Wed, 02 Sep 2009 14:29:32 +0100 |
| parents | 79e24d9d451d |
| children | a097a8d2aa15 |
| files | packages/fs/yaffs/current/ChangeLog packages/fs/yaffs/current/cdl/yaffs.cdl packages/fs/yaffs/current/doc/yaffs.sgml packages/fs/yaffs/current/src/yaffs_guts.h |
| diffstat | 4 files changed, 29 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/fs/yaffs/current/ChangeLog +++ b/packages/fs/yaffs/current/ChangeLog @@ -1,6 +1,7 @@ 2009-08-28 Ross Younger <wry@ecoscentric.com> * doc/yaffs.sgml: Bring explanations of CDL options up-to-date. + * yaffs.cdl: Add CYGNUM_FS_YAFFS_TEMP_BUFFERS tuning parameter. 2009-08-26 Ross Younger <wry@ecoscentric.com>
--- a/packages/fs/yaffs/current/cdl/yaffs.cdl +++ b/packages/fs/yaffs/current/cdl/yaffs.cdl @@ -179,7 +179,25 @@ cdl_package CYGPKG_FS_YAFFS { are recommended; set to 0 to disable cacheing. Wizards may wish to tune this value to improve performance. Note that this setting is a global default and may be - configured per-device by a mount-time option." + configured per-device by a mount-time option. There is also + an upper limit hard-wired into the code as + YAFFS_MAX_SHORT_OP_CACHES; numbers in excess of this ceiling + will be ignored." + } + + cdl_option CYGNUM_FS_YAFFS_TEMP_BUFFERS { + display "Number of preallocated temporary page buffers" + flavor data + default_value 6 + legal_values 0 to 0x7fffffff + description " + At mount time, YAFFS preallocates a number of temporary + buffers, which are used in many places throughout the code. + This setting controls how many. + If YAFFS ever runs out of temporary buffers, it calls malloc to + dynamically allocate further buffers as needed. + Most users will not need to change this setting, but it may + prove a useful tuning parameter." } cdl_option CYGNUM_FS_YAFFS_TRACEMASK {
--- a/packages/fs/yaffs/current/doc/yaffs.sgml +++ b/packages/fs/yaffs/current/doc/yaffs.sgml @@ -232,6 +232,14 @@ improve performance. Set to 0 to disable these caches altogether. <emphasis>This setting is a global default and may be changed by a mount-time option.</emphasis></para></listitem></varlistentry> +<varlistentry><term><constant>CYGNUM_FS_YAFFS_TEMP_BUFFERS</constant></term> +<listitem><para> +YAFFS requires temporary buffers in many places throughout the code. +To avoid the overhead of a dynamic malloc every time, a number of +buffers are preallocated at mount time. This setting controls how many; +should it not prove enough, YAFFS will call maloc on demand as required. +The default setting is 6; most users will not need to change it. +</para></listitem></varlistentry> <varlistentry><term><constant>CYGNUM_FS_YAFFS_TRACEMASK</constant></term><listitem><para>This is a 32-bit bitfield which controls diagnostic output. The bit definitions are found in <filename>yportenv.h</filename>; changing this setting tends to only be useful
--- a/packages/fs/yaffs/current/src/yaffs_guts.h +++ b/packages/fs/yaffs/current/src/yaffs_guts.h @@ -90,7 +90,7 @@ #define YAFFS_MAX_SHORT_OP_CACHES 20 -#define YAFFS_N_TEMP_BUFFERS 6 +#define YAFFS_N_TEMP_BUFFERS CYGNUM_FS_YAFFS_TEMP_BUFFERS /* We limit the number attempts at sucessfully saving a chunk of data. * Small-page devices have 32 pages per block; large-page devices have 64.
