lkml.org 
[lkml]   [2007]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [11/36] Use page_cache_xxx in fs/buffer.c
On Fri, 31 Aug 2007, Dmitry Monakhov wrote:

> > Ok. So another solution maybe to limit the blocksizes that can be used
> > with a device?
> IMHO It is not good because after fs was created with big blksize it's image
> cant be used on other devices.

Ok so a raw copy of the partition would do this?

> We may just rewrite submit_bh simular to drivers/md/dm-io.c:do_region
> with following pseudocode:
>
> remaning = super_page_size();

That would be compound_size(page)

> while (remaining) {
> init_bio(bio);
> /*Try and add as many pages as possible*/

This seems to be doing the same as get_user_pages() serializing the
compound page.

> while (remaining) {
> dp->get_page(dp, &page, &len, &offset);
> len = min(len,
> to_bytes(remaining));
> if(!bio_add_page(bio, page, len, offset))
> break;
> offset = 0;
> remaining -= to_sector(len);
> dp->next_page(dp);
> }
> atomic_inc(&io->count);
> submit_bio(rw, bio);
> }

Another solution may be to not serialize but instead determine the maximum
segment length and generate bios that reference various subsection of the
compound page of that length? That way you do not serialize and later
coalesce again.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-31 17:31    [W:0.215 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site