Re: [PATCH v3 4/4] backends/hostmem: Report error when memory size is unaligned

2024-05-31 Thread Philippe Mathieu-Daudé
On 31/5/24 17:10, Michal Privoznik wrote: If memory-backend-{file,ram} has a size that's not aligned to underlying page size it is not only wasteful, but also may lead to hard to debug behaviour. For instance, in case memory-backend-file and hugepages, madvise() and mbind() fail. Rightfully so, p

[PATCH v3 4/4] backends/hostmem: Report error when memory size is unaligned

2024-05-31 Thread Michal Privoznik
If memory-backend-{file,ram} has a size that's not aligned to underlying page size it is not only wasteful, but also may lead to hard to debug behaviour. For instance, in case memory-backend-file and hugepages, madvise() and mbind() fail. Rightfully so, page is the smallest unit they can work with.