JFFS3 & performance
Artem B. Bityuckiy
dedekind at infradead.org
Wed Jan 19 10:51:14 EST 2005
On Wed, 19 Jan 2005, [iso-8859-1] Jörn Engel wrote:
> On Wed, 19 January 2005 15:27:53 +0000, Artem B. Bityuckiy wrote:
> > >
> > > Something like this?
> > >
> > > int jffs3_write_with_checksum(void *data, ...)
> > > {
> > > ...
> > > if (mtd->write_with_checksum)
> > > return mtd->write_with_checksum(data, ...);
> > > mtd->write(data, ...);
> > > mtd->write(checksum(data), ...);
> > > }
> > >
> > > Jörn
> > Can't get it - What is the goal? Some advandages?
>
> As you explained, Joakim's proposal doesn't always make sense.
> Basically, if the underlying drives uses DMA, there is no point. If
> it does memcpy(), then it's faster to checksum/copy in a single loop,
> rather than do both things individually.
>
> With the above code, an mtd driver can supply a converged
> checksum/copy method, but doesn't have to. If it doesn't, we do
> regular copy (through mtd->write) and checksum instead.
>
Hmm. Don't know if this good.
In case of network CRCs are always needed and the algorithm is the same.
In our case MTD is not dedicated to JFFS2. It is consceptually wrong to
implement this on MTD layer. This implies one more operation to drivers...
And then one may want to use another checksum algorith.... Implement yet
another operation? Doubts... (even understanding that this may lead to
better performance...). Thinking more needed.
> Jörn
>
> --
> The wise man seeks everything in himself; the ignorant man tries to get
> everything from somebody else.
> -- unknown
>
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
More information about the linux-mtd
mailing list