Re: [11/36] Use page_cache_xxx in fs/buffer.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux