On 2/3/20 6:31 PM, David Hildenbrand wrote: > When shrinking a mmap we want to re-reserve the already populated area. > When growing a memory region, we want to populate starting with a given > fd_offset. Prepare by allowing to pass these parameters. > > Also, let's make sure we always process full pages, to avoid > unmapping/remapping pages that are already in use when > growing/shrinking. (existing callers seem to guarantee this, but that's > not obvious) > > Cc: "Michael S. Tsirkin" <[email protected]> > Cc: Greg Kurz <[email protected]> > Cc: Murilo Opsfelder Araujo <[email protected]> > Cc: Eduardo Habkost <[email protected]> > Cc: "Dr. David Alan Gilbert" <[email protected]> > Signed-off-by: David Hildenbrand <[email protected]> > --- > util/mmap-alloc.c | 32 +++++++++++++++++++++----------- > 1 file changed, 21 insertions(+), 11 deletions(-)
Reviewed-by: Richard Henderson <[email protected]> r~
