Re: [PATCH 0/6] fuse: allocate req->pages[] dynamically

From: Maxim V. Patlasov
Date: Wed Sep 12 2012 - 12:06:27 EST


Hi Miklos,

So far as no objections appeared, I'll go ahead and replace fuse req->page with req->pagevec. It will point to an array of structs:

struct page_vec {
struct page *pv_page;
unsigned int pv_len;
unsigned int pv_offset;
};

instead of 'struct page *' as it used to be. It seems to be what you suggested in one of your comments. Are you OK about it?

Thanks,
Maxim

09/07/2012 09:40 PM, Maxim Patlasov ÐÐÑÐÑ:
Hi,

Currently, any fuse request always includes inline pages[] array of
FUSE_MAX_PAGES_PER_REQ elements. This is the waste of memory because
in many cases smaller size would suffice.

The patch-set tries to allocate only as many elements of pages[] array as
actaully needed. This will be even more useful in the future because of:

1. Mitsuo's patches making maximum read/write request size tunable.
2. My patches optimizing scatter-gather direct IO. To make them simplier I'll
need to substitute array of 'struct page *' with array of 'struct bio_vec'.
It would make memory overhead worse if implemented w/o this patch-set.

Thanks,
Maxim


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/