[linux-mm-cc] Compcache as Ramdisk

Nitin Gupta nitingupta910 at gmail.com
Mon Jul 20 23:46:27 EDT 2009


On 07/20/2009 06:47 PM, Vijayendra Suman wrote:
> Hi All,
> I finally got the solution to the hang problem.
> To make it run as ramdisk,
<snip>
> In the function compcache_make_request function i added
>  bio_for_each_segment( bv, bio, i )
> {
>  page = bv->bv_page;
>  page_no = ((bio->bi_sector >> SECTORS_PER_PAGE_SHIFT) + i);
> {
> ... /* Switch Loop */
> }


There is slight problem with this: ramzswap_read() still writes out 
entire page to
output bio page even when only a small fragment was request. This is a 
buffer overrun!
I have slight feel that there is a (somewhat inefficient) solution that 
will work. I hope to get
it in place soon and lets see if that works...

Thanks,
Nitin




More information about the linux-mm-cc mailing list