Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
On 2/12/25 7:42 PM, Peter Xu wrote: On Wed, Feb 12, 2025 at 07:17:45PM +0300, Daniil Tatianin wrote: -static inline int os_mlock(void) +static inline int os_mlock(bool on_fault) { +(void)on_fault; Is this really needed ? Our compiler flags don't enable warnings about unused variables.

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Peter Xu
On Wed, Feb 12, 2025 at 07:17:45PM +0300, Daniil Tatianin wrote: > > > -static inline int os_mlock(void) > > > +static inline int os_mlock(bool on_fault) > > > { > > > +(void)on_fault; > > Is this really needed ? Our compiler flags don't enable warnings > > about unused variables. > > Hmm, I

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
On 2/12/25 6:30 PM, Daniel P. Berrangé wrote: On Wed, Feb 12, 2025 at 05:39:17PM +0300, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin --- include/system/os-posix.h | 2

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 16:23, Peter Xu wrote: On Wed, Feb 12, 2025 at 05:39:17PM +0300, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin --- include/system/os-posix.h | 2 +- include

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Peter Xu
On Wed, Feb 12, 2025 at 03:30:21PM +, Daniel P. Berrangé wrote: > > diff --git a/include/system/os-win32.h b/include/system/os-win32.h > > index b82a5d3ad9..cd61d69e10 100644 > > --- a/include/system/os-win32.h > > +++ b/include/system/os-win32.h > > @@ -123,8 +123,9 @@ static inline bool is_da

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Peter Xu
On Wed, Feb 12, 2025 at 05:39:17PM +0300, Daniil Tatianin wrote: > This will be used in the following commits to make it possible to only > lock memory on fault instead of right away. > > Signed-off-by: Daniil Tatianin > --- > include/system/os-posix.h | 2 +- > include/system/os-win32.h | 3 +

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 05:39:17PM +0300, Daniil Tatianin wrote: > This will be used in the following commits to make it possible to only > lock memory on fault instead of right away. > > Signed-off-by: Daniil Tatianin > --- > include/system/os-posix.h | 2 +- > include/system/os-win32.h | 3 +

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
On 2/12/25 6:23 PM, Peter Xu wrote: On Wed, Feb 12, 2025 at 05:39:17PM +0300, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin --- include/system/os-posix.h | 2 +- incl

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 15:51, Daniil Tatianin wrote: On 2/12/25 5:48 PM, Philippe Mathieu-Daudé wrote: Hi Daniil, On 12/2/25 15:39, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin --

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
On 2/12/25 5:48 PM, Philippe Mathieu-Daudé wrote: Hi Daniil, On 12/2/25 15:39, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin ---   include/system/os-posix.h |  2 +-   in

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Philippe Mathieu-Daudé
Hi Daniil, On 12/2/25 15:39, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin --- include/system/os-posix.h | 2 +- include/system/os-win32.h | 3 ++- meson.build

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Vladimir Sementsov-Ogievskiy
On 12.02.25 17:39, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin --- include/system/os-posix.h | 2 +- include/system/os-win32.h | 3 ++- meson.build | 6 ++ migration/postcopy-ram.c | 2 +- o