From: fengchengwen <fengchengwen@huawei.com>
To: "Bathija, Pravin" <Pravin.Bathija@dell.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "pravin.m.bathija.dev@gmail.com" <pravin.m.bathija.dev@gmail.com>
Subject: Re: [PATCH v3 5/5] vhost_user: Increase number of memory regions
Date: Wed, 12 Nov 2025 09:26:04 +0800 [thread overview]
Message-ID: <9f38ffe8-bfd0-4af0-bf2f-f1239823c9cd@huawei.com> (raw)
In-Reply-To: <SJ0PR19MB46063C6E41E929271093CE1FF5CFA@SJ0PR19MB4606.namprd19.prod.outlook.com>
On 11/11/2025 7:34 PM, Bathija, Pravin wrote:
> Responses inline.
>
>
> Internal Use - Confidential
>> -----Original Message-----
>> From: fengchengwen <fengchengwen@huawei.com>
>> Sent: Tuesday, November 4, 2025 12:12 AM
>> To: Bathija, Pravin <Pravin.Bathija@dell.com>; dev@dpdk.org
>> Cc: pravin.m.bathija.dev@gmail.com
>> Subject: Re: [PATCH v3 5/5] vhost_user: Increase number of memory regions
>>
>>
>> [EXTERNAL EMAIL]
>>
>> On 11/4/2025 12:21 PM, Pravin M Bathija wrote:
>>> In this patch the number of memory regions are increased from
>>> 8 to 128. When a vhost-user front-end such as qemu or libblkio queries
>>> the back-end such as dpdk with the message, get max number of memory
>>> slots, the back-end replies with this number 128 instead of the
>>> previously defined 8. The back-end also allocates that many slots in
>>> the memory table where regions are added/removed as requested by the
>>> vhost-user front-end. This also helps the vhost- user front-end to
>>> limit the number of memory regions when sending the set mem table
>>> message ar adding memory regions.
>>>
>>> Signed-off-by: Pravin M Bathija <pravin.bathija@dell.com>
>>> ---
>>> lib/vhost/vhost_user.h | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h index
>>> 5a0e747b58..c6ad5b76d6 100644
>>> --- a/lib/vhost/vhost_user.h
>>> +++ b/lib/vhost/vhost_user.h
>>> @@ -11,7 +11,7 @@
>>>
>>> /* refer to hw/virtio/vhost-user.c */
>>>
>>> -#define VHOST_MEMORY_MAX_NREGIONS 8
>>> +#define VHOST_MEMORY_MAX_NREGIONS 128
>>
>> The address translation may increase a lot if the real region is 128.
>> Maybe we should add another patch to optimize it.
>
> Could you please share more thoughts on this ? Are you concerned about the number of addresses and translation table bloat ? What optimization are you suggesting ?
Because each memory region is independent and does not overlap, maybe
we could use binary search to optimize it.
>
>>
>>>
>>> #define VHOST_USER_NET_SUPPORTED_FEATURES \
>>> (VIRTIO_NET_SUPPORTED_FEATURES | \
>
>
prev parent reply other threads:[~2025-11-12 1:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 4:21 [PATCH v3 0/5] Support add/remove memory region & get-max-slots Pravin M Bathija
2025-11-04 4:21 ` [PATCH v3 1/5] vhost: add user to mailmap and define to vhost hdr Pravin M Bathija
2025-11-04 7:15 ` fengchengwen
2025-11-11 11:14 ` Bathija, Pravin
2025-11-04 4:21 ` [PATCH v3 2/5] vhost_user: header defines for add/rem mem region Pravin M Bathija
2025-11-04 7:18 ` fengchengwen
2025-11-04 4:21 ` [PATCH v3 3/5] vhost_user: Function defs for add/rem mem regions Pravin M Bathija
2025-11-04 7:48 ` fengchengwen
2025-11-11 11:28 ` Bathija, Pravin
2025-11-04 4:21 ` [PATCH v3 4/5] vhost_user: support function defines for back-end Pravin M Bathija
2025-11-04 8:05 ` fengchengwen
2025-11-11 11:31 ` Bathija, Pravin
2025-11-12 1:21 ` fengchengwen
2025-11-04 4:21 ` [PATCH v3 5/5] vhost_user: Increase number of memory regions Pravin M Bathija
2025-11-04 8:12 ` fengchengwen
2025-11-11 11:34 ` Bathija, Pravin
2025-11-12 1:26 ` fengchengwen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9f38ffe8-bfd0-4af0-bf2f-f1239823c9cd@huawei.com \
--to=fengchengwen@huawei.com \
--cc=Pravin.Bathija@dell.com \
--cc=dev@dpdk.org \
--cc=pravin.m.bathija.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).