Re: [PATCH RFC 08/21] ramblock: Cache the length to do file mmap() on ramblocks

2023-01-30 Thread Peter Xu
On Mon, Jan 30, 2023 at 06:05:47AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > We do proper page size alignment for file backed mmap()s for ramblocks. > > Even if it's as simple as that, cache the value because it'll be used in > > multiple places. > > > > Since at it, drop size for file_ram

Re: [PATCH RFC 08/21] ramblock: Cache the length to do file mmap() on ramblocks

2023-01-29 Thread Juan Quintela
Peter Xu wrote: > We do proper page size alignment for file backed mmap()s for ramblocks. > Even if it's as simple as that, cache the value because it'll be used in > multiple places. > > Since at it, drop size for file_ram_alloc() and just use max_length because > that's always true for file-back

Re: [PATCH RFC 08/21] ramblock: Cache the length to do file mmap() on ramblocks

2023-01-24 Thread Peter Xu
On Mon, Jan 23, 2023 at 06:51:51PM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > We do proper page size alignment for file backed mmap()s for ramblocks. > > Even if it's as simple as that, cache the value because it'll be used in > > multiple places. > > > > Sinc

Re: [PATCH RFC 08/21] ramblock: Cache the length to do file mmap() on ramblocks

2023-01-23 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > We do proper page size alignment for file backed mmap()s for ramblocks. > Even if it's as simple as that, cache the value because it'll be used in > multiple places. > > Since at it, drop size for file_ram_alloc() and just use max_length because > that's alw

[PATCH RFC 08/21] ramblock: Cache the length to do file mmap() on ramblocks

2023-01-17 Thread Peter Xu
We do proper page size alignment for file backed mmap()s for ramblocks. Even if it's as simple as that, cache the value because it'll be used in multiple places. Since at it, drop size for file_ram_alloc() and just use max_length because that's always true for file-backed ramblocks. Signed-off-by