public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* 4K block size question
@ 2004-10-20 10:57 Artem B. Bityuckiy
  2004-10-20 11:00 ` David Woodhouse
  0 siblings, 1 reply; 7+ messages in thread
From: Artem B. Bityuckiy @ 2004-10-20 10:57 UTC (permalink / raw)
  To: linux-mtd

Hello,

In case of 2MiB NAND flash (with 256-byte page) the sector size is 4KiB. 
The JFFS2 virtual block size is also 4KiB.

The size of pristine node is 4KiB data + node header. So, in 
uncompressed form, the pristine node can't fit into JFFS2 block if the 
compression is disabled. So, how does JFFS2 work on such flash :-) ?

Thanks.

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

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

* Re: 4K block size question
  2004-10-20 10:57 4K block size question Artem B. Bityuckiy
@ 2004-10-20 11:00 ` David Woodhouse
  2004-10-20 11:17   ` Artem B. Bityuckiy
  0 siblings, 1 reply; 7+ messages in thread
From: David Woodhouse @ 2004-10-20 11:00 UTC (permalink / raw)
  To: Artem B. Bityuckiy; +Cc: linux-mtd

On Wed, 2004-10-20 at 14:57 +0400, Artem B. Bityuckiy wrote:
> Hello,
> 
> In case of 2MiB NAND flash (with 256-byte page) the sector size is 4KiB. 
> The JFFS2 virtual block size is also 4KiB.
> 
> The size of pristine node is 4KiB data + node header. So, in 
> uncompressed form, the pristine node can't fit into JFFS2 block if the 
> compression is disabled. So, how does JFFS2 work on such flash :-) ?

By writing nodes which don't cover a full 4KiB and hence aren't
pristine.

-- 
dwmw2

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

* Re: 4K block size question
  2004-10-20 11:00 ` David Woodhouse
@ 2004-10-20 11:17   ` Artem B. Bityuckiy
  2004-10-20 11:21     ` David Woodhouse
  0 siblings, 1 reply; 7+ messages in thread
From: Artem B. Bityuckiy @ 2004-10-20 11:17 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

> By writing nodes which don't cover a full 4KiB and hence aren't
> pristine.
Thanks.

By the way, what do you (and other JFFS2 folks) think about very big 
nodes of size = block size? I'm going to create such a big inode 
checkpoints. Is it OK? Are there some reasons not to do so and split 
them into several smaller nodes?

Thanks.

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

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

* Re: 4K block size question
  2004-10-20 11:17   ` Artem B. Bityuckiy
@ 2004-10-20 11:21     ` David Woodhouse
  2004-10-20 11:59       ` Artem B. Bityuckiy
  2004-10-21 11:58       ` Artem B. Bityuckiy
  0 siblings, 2 replies; 7+ messages in thread
From: David Woodhouse @ 2004-10-20 11:21 UTC (permalink / raw)
  To: Artem B. Bityuckiy; +Cc: linux-mtd

On Wed, 2004-10-20 at 15:17 +0400, Artem B. Bityuckiy wrote:
> > By writing nodes which don't cover a full 4KiB and hence aren't
> > pristine.
> Thanks.
> 
> By the way, what do you (and other JFFS2 folks) think about very big 
> nodes of size = block size? I'm going to create such a big inode 
> checkpoints. Is it OK? Are there some reasons not to do so and split 
> them into several smaller nodes?

Other than the fact that it doesn't pack well, not really. If they're
that large are they _really_ an effective use of space? 

-- 
dwmw2

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

* Re: 4K block size question
  2004-10-20 11:21     ` David Woodhouse
@ 2004-10-20 11:59       ` Artem B. Bityuckiy
  2004-10-21 11:58       ` Artem B. Bityuckiy
  1 sibling, 0 replies; 7+ messages in thread
From: Artem B. Bityuckiy @ 2004-10-20 11:59 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

Ok, thanks for answer.

> Other than the fact that it doesn't pack well, not really.
Hmm, I don't cleanly understand what do you mean. I suspect you mean 
that requesting the whole block from the jffs2_reserve_space() is bad 
idea - I agree, I am not going to do so.

Or you mean that small chunks of data are compressed better than big 
ones? If so, can you pleas explain why?

> If they're that large are they _really_ an effective use of space? 
Of course, I gonna request small piece of space (small minsize parameter 
of the jffs2_reserve_space()). But, if the jffs2_reserve_space() 
allocates the whole block, I think it is OK to write one big node.


-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

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

* Re: 4K block size question
  2004-10-20 11:21     ` David Woodhouse
  2004-10-20 11:59       ` Artem B. Bityuckiy
@ 2004-10-21 11:58       ` Artem B. Bityuckiy
  2004-10-21 12:08         ` David Woodhouse
  1 sibling, 1 reply; 7+ messages in thread
From: Artem B. Bityuckiy @ 2004-10-21 11:58 UTC (permalink / raw)
  To: linux-mtd; +Cc: David Woodhouse

Hello,

In the JFFS2, there is place where both c->erase_completion and 
c->inocache spinlocks are held. But the c->erase_completion is locked 
first. This fact does not highlighted in the README.Locking file.

I propose to metnion it there. (i.e., that if both locks are needed, the 
c->erase_completion must be locked first).


-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

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

* Re: 4K block size question
  2004-10-21 11:58       ` Artem B. Bityuckiy
@ 2004-10-21 12:08         ` David Woodhouse
  0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2004-10-21 12:08 UTC (permalink / raw)
  To: Artem B. Bityuckiy; +Cc: linux-mtd

On Thu, 2004-10-21 at 15:58 +0400, Artem B. Bityuckiy wrote:
> Hello,
> 
> In the JFFS2, there is place where both c->erase_completion and 
> c->inocache spinlocks are held. But the c->erase_completion is locked 
> first. This fact does not highlighted in the README.Locking file.
> 
> I propose to metnion it there. (i.e., that if both locks are needed, the 
> c->erase_completion must be locked first).

Well spotted; thanks.

-- 
dwmw2

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

end of thread, other threads:[~2004-10-21 12:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-20 10:57 4K block size question Artem B. Bityuckiy
2004-10-20 11:00 ` David Woodhouse
2004-10-20 11:17   ` Artem B. Bityuckiy
2004-10-20 11:21     ` David Woodhouse
2004-10-20 11:59       ` Artem B. Bityuckiy
2004-10-21 11:58       ` Artem B. Bityuckiy
2004-10-21 12:08         ` David Woodhouse

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