Miklos Szeredi e52a825048 fuse: realloc page array
Writeback caching currently allocates requests with the maximum number of
possible pages, while the actual number of pages per request depends on a
couple of factors that cannot be determined when the request is allocated
(whether page is already under writeback, whether page is contiguous with
previous pages already added to a request).

This patch allows such requests to start with no page allocation (all pages
inline) and grow the page array on demand.

If the max_pages tunable remains the default value, then this will mean
just one allocation that is the same size as before.  If the tunable is
larger, then this adds at most 3 additional memory allocations (which is
generously compensated by the improved performance from the larger
request).

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-01 10:07:06 +02:00
..
2018-09-28 16:43:22 +02:00
2018-10-01 10:07:06 +02:00
2018-10-01 10:07:05 +02:00
2018-10-01 10:07:06 +02:00
2018-10-01 10:07:06 +02:00
2018-10-01 10:07:06 +02:00
2016-10-01 07:32:32 +02:00
2018-09-28 16:43:23 +02:00