public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* gc_minfree_threshold
@ 2000-08-26 11:08 Nick Ivanter
  2000-08-27 10:09 ` gc_minfree_threshold David Woodhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Ivanter @ 2000-08-26 11:08 UTC (permalink / raw)
  To: David Woodhouse; +Cc: mtd

David,
I have just noticed some strange things in the code dealing
with gc_minfree_threshold. I guess you added that code that is
why I am addressing my questions to you.

First, when you initialize c->gc_minfree_threshold to 5%
of the total Flash size, you then make sure that it is not less
than a sector size. Why? Shouldn't it rather be not less than
fmc->min_free_size?

Second, when you evaluate a gc starting criteria in
thread_should_wake(), you compare gc_minfree_threshold with
dirty_size. I guess there should be free_size instead.

Thanks,
Nick



To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gc_minfree_threshold
  2000-08-26 11:08 gc_minfree_threshold Nick Ivanter
@ 2000-08-27 10:09 ` David Woodhouse
  0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2000-08-27 10:09 UTC (permalink / raw)
  To: Nick Ivanter; +Cc: mtd, jffs-dev

On Sat, 26 Aug 2000, Nick Ivanter wrote:

> David,
> I have just noticed some strange things in the code dealing
> with gc_minfree_threshold. I guess you added that code that is
> why I am addressing my questions to you.
> 
> First, when you initialize c->gc_minfree_threshold to 5%
> of the total Flash size, you then make sure that it is not less
> than a sector size. Why? Shouldn't it rather be not less than
> fmc->min_free_size?

Yes, it probably should.

> Second, when you evaluate a gc starting criteria in
> thread_should_wake(), you compare gc_minfree_threshold with
> dirty_size. I guess there should be free_size instead.

It was once. Between v1.44 and 1.45, this happened:
-       if (nfree < c->gc_minfree_threshold)
+       if (c->fmc->dirty_size < c->gc_minfree_threshold)

Mea Culpa. I got the replacement wrong.

Actually I was thinking of dropping both of those and changing it to
something like:
	if (dirty_size > free_size)
		return 1;

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-08-27 10:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-26 11:08 gc_minfree_threshold Nick Ivanter
2000-08-27 10:09 ` gc_minfree_threshold David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox