[PATCH] migration/multifd: Fix compile error caused by page_size usage

Shameer Kolothum via posted 1 patch 5 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20241203124943.52572-1-shameerali.kolothum.thodi@huawei.com
Maintainers: Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>
migration/multifd-uadk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] migration/multifd: Fix compile error caused by page_size usage
Posted by Shameer Kolothum via 5 months, 1 week ago
From Commit 90fa121c6c07 ("migration/multifd: Inline page_size and
page_count") onwards page_size is not part of MutiFD*Params but uses
an inline constant instead.

However, it missed updating an old usage, causing a compile error.

Fixes: 90fa121c6c07 ("migration/multifd: Inline page_size and page_count")
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
---
 migration/multifd-uadk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/multifd-uadk.c b/migration/multifd-uadk.c
index 6e6a290ae9..6895c1f65a 100644
--- a/migration/multifd-uadk.c
+++ b/migration/multifd-uadk.c
@@ -169,7 +169,7 @@ static int multifd_uadk_send_prepare(MultiFDSendParams *p, Error **errp)
             .src_len = page_size,
             .dst     = buf,
             /* Set dst_len to double the src in case compressed out >= page_size */
-            .dst_len = p->page_size * 2,
+            .dst_len = page_size * 2,
         };
 
         if (uadk_data->handle) {
-- 
2.34.1
Re: [PATCH] migration/multifd: Fix compile error caused by page_size usage
Posted by Michael Tokarev 4 months ago
03.12.2024 15:49, Shameer Kolothum via wrote:
>  From Commit 90fa121c6c07 ("migration/multifd: Inline page_size and
> page_count") onwards page_size is not part of MutiFD*Params but uses
> an inline constant instead.
> 
> However, it missed updating an old usage, causing a compile error.
> 
> Fixes: 90fa121c6c07 ("migration/multifd: Inline page_size and page_count")
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>

This looks like a qemu-stable material, is it not?

I wonder how come thie code hasn't been compiled since 90fa121c6c07.

/mjt

>   migration/multifd-uadk.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/migration/multifd-uadk.c b/migration/multifd-uadk.c
> index 6e6a290ae9..6895c1f65a 100644
> --- a/migration/multifd-uadk.c
> +++ b/migration/multifd-uadk.c
> @@ -169,7 +169,7 @@ static int multifd_uadk_send_prepare(MultiFDSendParams *p, Error **errp)
>               .src_len = page_size,
>               .dst     = buf,
>               /* Set dst_len to double the src in case compressed out >= page_size */
> -            .dst_len = p->page_size * 2,
> +            .dst_len = page_size * 2,
>           };
>   
>           if (uadk_data->handle) {
Re: [PATCH] migration/multifd: Fix compile error caused by page_size usage
Posted by Fabiano Rosas 4 months ago
Michael Tokarev <mjt@tls.msk.ru> writes:

> 03.12.2024 15:49, Shameer Kolothum via wrote:
>>  From Commit 90fa121c6c07 ("migration/multifd: Inline page_size and
>> page_count") onwards page_size is not part of MutiFD*Params but uses
>> an inline constant instead.
>> 
>> However, it missed updating an old usage, causing a compile error.
>> 
>> Fixes: 90fa121c6c07 ("migration/multifd: Inline page_size and page_count")
>> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
>
> This looks like a qemu-stable material, is it not?
>

Yes.

> I wonder how come thie code hasn't been compiled since 90fa121c6c07.

The various pieces of code that support hardware accelerators in
migration all depend on specific hardware and libraries, so it's all
gated behind CONFIGs that are not enabled by default. We don't have
resources to test this, it's up to the people interested in that code to
check that it still works.

I have suggested we move more code out of the CONFIGs to minimize the
amount of untested code, but we've ended up deciding that since we need
help from people to maintain it anyway, it's not worth the extra work to
isolate the hw-specific code even more.

>
> /mjt
>
>>   migration/multifd-uadk.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/migration/multifd-uadk.c b/migration/multifd-uadk.c
>> index 6e6a290ae9..6895c1f65a 100644
>> --- a/migration/multifd-uadk.c
>> +++ b/migration/multifd-uadk.c
>> @@ -169,7 +169,7 @@ static int multifd_uadk_send_prepare(MultiFDSendParams *p, Error **errp)
>>               .src_len = page_size,
>>               .dst     = buf,
>>               /* Set dst_len to double the src in case compressed out >= page_size */
>> -            .dst_len = p->page_size * 2,
>> +            .dst_len = page_size * 2,
>>           };
>>   
>>           if (uadk_data->handle) {
Re: [PATCH] migration/multifd: Fix compile error caused by page_size usage
Posted by Fabiano Rosas 5 months, 1 week ago
Shameer Kolothum via <qemu-devel@nongnu.org> writes:

> From Commit 90fa121c6c07 ("migration/multifd: Inline page_size and
> page_count") onwards page_size is not part of MutiFD*Params but uses
> an inline constant instead.
>
> However, it missed updating an old usage, causing a compile error.
>
> Fixes: 90fa121c6c07 ("migration/multifd: Inline page_size and page_count")
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Re: [PATCH] migration/multifd: Fix compile error caused by page_size usage
Posted by Peter Xu 5 months, 1 week ago
On Tue, Dec 03, 2024 at 10:17:14AM -0300, Fabiano Rosas wrote:
> Shameer Kolothum via <qemu-devel@nongnu.org> writes:
> 
> > From Commit 90fa121c6c07 ("migration/multifd: Inline page_size and
> > page_count") onwards page_size is not part of MutiFD*Params but uses
> > an inline constant instead.
> >
> > However, it missed updating an old usage, causing a compile error.
> >
> > Fixes: 90fa121c6c07 ("migration/multifd: Inline page_size and page_count")
> > Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
> 
> Reviewed-by: Fabiano Rosas <farosas@suse.de>

Wanna pick this up for your qtest pull for 10.0 altogether?

-- 
Peter Xu
Re: [PATCH] migration/multifd: Fix compile error caused by page_size usage
Posted by Fabiano Rosas 5 months, 1 week ago
Peter Xu <peterx@redhat.com> writes:

> On Tue, Dec 03, 2024 at 10:17:14AM -0300, Fabiano Rosas wrote:
>> Shameer Kolothum via <qemu-devel@nongnu.org> writes:
>> 
>> > From Commit 90fa121c6c07 ("migration/multifd: Inline page_size and
>> > page_count") onwards page_size is not part of MutiFD*Params but uses
>> > an inline constant instead.
>> >
>> > However, it missed updating an old usage, causing a compile error.
>> >
>> > Fixes: 90fa121c6c07 ("migration/multifd: Inline page_size and page_count")
>> > Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
>> 
>> Reviewed-by: Fabiano Rosas <farosas@suse.de>
>
> Wanna pick this up for your qtest pull for 10.0 altogether?

Yep