summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
af1e66b)
This allows us to track the impact of background gc.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
unsigned int yaffs_wr_attempts = YAFFS_WR_ATTEMPTS;
unsigned int yaffs_auto_checkpoint = 1;
unsigned int yaffs_gc_control = 1;
unsigned int yaffs_wr_attempts = YAFFS_WR_ATTEMPTS;
unsigned int yaffs_auto_checkpoint = 1;
unsigned int yaffs_gc_control = 1;
+unsigned int yaffs_bg_enable = 1;
/* Module Parameters */
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
/* Module Parameters */
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
module_param(yaffs_wr_attempts, uint, 0644);
module_param(yaffs_auto_checkpoint, uint, 0644);
module_param(yaffs_gc_control, uint, 0644);
module_param(yaffs_wr_attempts, uint, 0644);
module_param(yaffs_auto_checkpoint, uint, 0644);
module_param(yaffs_gc_control, uint, 0644);
+module_param(yaffs_bg_enable, uint, 0644);
#else
MODULE_PARM(yaffs_traceMask, "i");
MODULE_PARM(yaffs_wr_attempts, "i");
#else
MODULE_PARM(yaffs_traceMask, "i");
MODULE_PARM(yaffs_wr_attempts, "i");
- if(time_after(now, next_dir_update)){
+ if(time_after(now, next_dir_update) && yaffs_bg_enable){
yaffs_UpdateDirtyDirectories(dev);
next_dir_update = now + HZ;
}
yaffs_UpdateDirtyDirectories(dev);
next_dir_update = now + HZ;
}
- if(time_after(now,next_gc)){
+ if(time_after(now,next_gc) && yaffs_bg_enable){
if(!dev->isCheckpointed){
urgency = yaffs_bg_gc_urgency(dev);
gcResult = yaffs_BackgroundGarbageCollect(dev, urgency);
if(!dev->isCheckpointed){
urgency = yaffs_bg_gc_urgency(dev);
gcResult = yaffs_BackgroundGarbageCollect(dev, urgency);
buf += sprintf(buf, "allGCs............. %u\n", dev->allGCs);
buf += sprintf(buf, "passiveGCs......... %u\n", dev->passiveGCs);
buf += sprintf(buf, "oldestDirtyGCs..... %u\n", dev->oldestDirtyGCs);
buf += sprintf(buf, "allGCs............. %u\n", dev->allGCs);
buf += sprintf(buf, "passiveGCs......... %u\n", dev->passiveGCs);
buf += sprintf(buf, "oldestDirtyGCs..... %u\n", dev->oldestDirtyGCs);
+ buf += sprintf(buf, "nGCBlocks.......... %u\n", dev->nGCBlocks);
buf += sprintf(buf, "backgroundGCs...... %u\n", dev->backgroundGCs);
buf += sprintf(buf, "nRetriedWrites..... %u\n", dev->nRetriedWrites);
buf += sprintf(buf, "nRetireBlocks...... %u\n", dev->nRetiredBlocks);
buf += sprintf(buf, "backgroundGCs...... %u\n", dev->backgroundGCs);
buf += sprintf(buf, "nRetriedWrites..... %u\n", dev->nRetriedWrites);
buf += sprintf(buf, "nRetireBlocks...... %u\n", dev->nRetiredBlocks);
dev->param.nChunksPerBlock - dev->gcPagesInUse,
prioritised));
dev->param.nChunksPerBlock - dev->gcPagesInUse,
prioritised));
if(background)
dev->backgroundGCs++;
if(background)
dev->backgroundGCs++;
dev->gcDirtiest = 0;
dev->gcPagesInUse = 0;
dev->gcNotDone = 0;
dev->gcDirtiest = 0;
dev->gcPagesInUse = 0;
dev->gcNotDone = 0;
__u32 allGCs;
__u32 passiveGCs;
__u32 oldestDirtyGCs;
__u32 allGCs;
__u32 passiveGCs;
__u32 oldestDirtyGCs;
__u32 backgroundGCs;
__u32 nRetriedWrites;
__u32 nRetiredBlocks;
__u32 backgroundGCs;
__u32 nRetriedWrites;
__u32 nRetiredBlocks;