* [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
@ 2011-12-16 5:32 zanghongyong
0 siblings, 0 replies; 14+ messages in thread
From: zanghongyong @ 2011-12-16 5:32 UTC (permalink / raw)
To: linux-kernel
Cc: wusongwei, kvm, mst, netdev, hanweidong, virtualization,
xiaowei.yang, Hongyong Zang, levinsasha928
From: Hongyong Zang <zanghongyong@huawei.com>
Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
to translate GPA to HVA. Since kernel's kvm structure already maintains the
address relationship in its member *kvm_memslots*, these patches use kernel's
kvm_memslots directly without the need of initialization and maintenance of
vhost_memory.
Hongyong Zang (2):
kvm: Introduce get_kvm_from_task
vhost-net: Use kvm_memslots for address translation
drivers/vhost/vhost.c | 53 +++++++++++++++++----------------------------
include/linux/kvm_host.h | 2 +-
virt/kvm/kvm_main.c | 13 +++++++++++
3 files changed, 34 insertions(+), 34 deletions(-)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
2011-12-16 7:59 ` Sasha Levin
` (2 preceding siblings ...)
(?)
@ 2011-12-16 8:18 ` Zang Hongyong
-1 siblings, 0 replies; 14+ messages in thread
From: Zang Hongyong @ 2011-12-16 8:18 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, mst, kvm, virtualization, netdev, xiaowei.yang,
hanweidong, wusongwei
于 2011/12/16,星期五 15:59, Sasha Levin 写道:
> On Fri, 2011-12-16 at 15:40 +0800, Zang Hongyong wrote:
>> 于 2011/12/16,星期五 15:05, Sasha Levin 写道:
>>> On Fri, 2011-12-16 at 13:32 +0800, zanghongyong@huawei.com wrote:
>>>> From: Hongyong Zang<zanghongyong@huawei.com>
>>>>
>>>> Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
>>>> to translate GPA to HVA. Since kernel's kvm structure already maintains the
>>>> address relationship in its member *kvm_memslots*, these patches use kernel's
>>>> kvm_memslots directly without the need of initialization and maintenance of
>>>> vhost_memory.
>>> Conceptually, vhost isn't aware of KVM - it's just a driver which moves
>>> data from vq to a tap device and back. You can't simply add KVM specific
>>> code into vhost.
>>>
>>> Whats the performance benefit?
>>>
>> But vhost-net is only used in virtualization situation. vhost_memory is
>> maintained
>> by user space qemu.
>> In this way, the memory relationship can be accquired from kernel
>> without the
>> need of maintainence of vhost_memory from qemu.
> You can't assume that vhost-* is used only along with qemu/kvm. Just as
> virtio has more uses than just virtualization (heres one:
> https://lkml.org/lkml/2011/10/25/139 ), there are more uses for vhost as
> well.
>
> There has been a great deal of effort to keep vhost and kvm untangled.
> One example is the memory translation it has to do, another one is the
> eventfd/irqfd thing it does just so it could signal an IRQ in the guest
> instead of accessing the guest directly.
>
> If you do see a great performance increase when tying vhost and KVM
> together, it may be worth it to create some sort of an in-kernel
> vhost-kvm bridging thing, but if the performance isn't noticeable we're
> better off just leaving it as is and keeping the vhost code general.
>
Thanks for your explanation.
Since memory layout is seldom changed after guest boots, the situation
manily occurs during initialization. There's no need for vhost-kvm
bridge now.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
2011-12-16 7:59 ` Sasha Levin
(?)
(?)
@ 2011-12-16 8:18 ` Zang Hongyong
-1 siblings, 0 replies; 14+ messages in thread
From: Zang Hongyong @ 2011-12-16 8:18 UTC (permalink / raw)
To: Sasha Levin
Cc: wusongwei, kvm, mst, netdev, hanweidong, linux-kernel,
virtualization, xiaowei.yang
于 2011/12/16,星期五 15:59, Sasha Levin 写道:
> On Fri, 2011-12-16 at 15:40 +0800, Zang Hongyong wrote:
>> 于 2011/12/16,星期五 15:05, Sasha Levin 写道:
>>> On Fri, 2011-12-16 at 13:32 +0800, zanghongyong@huawei.com wrote:
>>>> From: Hongyong Zang<zanghongyong@huawei.com>
>>>>
>>>> Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
>>>> to translate GPA to HVA. Since kernel's kvm structure already maintains the
>>>> address relationship in its member *kvm_memslots*, these patches use kernel's
>>>> kvm_memslots directly without the need of initialization and maintenance of
>>>> vhost_memory.
>>> Conceptually, vhost isn't aware of KVM - it's just a driver which moves
>>> data from vq to a tap device and back. You can't simply add KVM specific
>>> code into vhost.
>>>
>>> Whats the performance benefit?
>>>
>> But vhost-net is only used in virtualization situation. vhost_memory is
>> maintained
>> by user space qemu.
>> In this way, the memory relationship can be accquired from kernel
>> without the
>> need of maintainence of vhost_memory from qemu.
> You can't assume that vhost-* is used only along with qemu/kvm. Just as
> virtio has more uses than just virtualization (heres one:
> https://lkml.org/lkml/2011/10/25/139 ), there are more uses for vhost as
> well.
>
> There has been a great deal of effort to keep vhost and kvm untangled.
> One example is the memory translation it has to do, another one is the
> eventfd/irqfd thing it does just so it could signal an IRQ in the guest
> instead of accessing the guest directly.
>
> If you do see a great performance increase when tying vhost and KVM
> together, it may be worth it to create some sort of an in-kernel
> vhost-kvm bridging thing, but if the performance isn't noticeable we're
> better off just leaving it as is and keeping the vhost code general.
>
Thanks for your explanation.
Since memory layout is seldom changed after guest boots, the situation
manily occurs during initialization. There's no need for vhost-kvm
bridge now.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
2011-12-16 7:59 ` Sasha Levin
@ 2011-12-16 8:07 ` Sasha Levin
-1 siblings, 0 replies; 14+ messages in thread
From: Sasha Levin @ 2011-12-16 8:07 UTC (permalink / raw)
To: Zang Hongyong
Cc: linux-kernel, mst, kvm, virtualization, netdev, xiaowei.yang,
hanweidong, wusongwei
On Fri, 2011-12-16 at 09:59 +0200, Sasha Levin wrote:
> There has been a great deal of effort to keep vhost and kvm untangled.
> One example is the memory translation it has to do, another one is the
> eventfd/irqfd thing it does just so it could signal an IRQ in the guest
> instead of accessing the guest directly.
Actually, CONFIG_VHOST_NET doesn't even depend on CONFIG_KVM, so your
patch will break build when (CONFIG_VHOST_NET=y && CONFIG_KVM=n).
--
Sasha.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
@ 2011-12-16 8:07 ` Sasha Levin
0 siblings, 0 replies; 14+ messages in thread
From: Sasha Levin @ 2011-12-16 8:07 UTC (permalink / raw)
To: Zang Hongyong
Cc: wusongwei, kvm, mst, netdev, hanweidong, linux-kernel,
virtualization, xiaowei.yang
On Fri, 2011-12-16 at 09:59 +0200, Sasha Levin wrote:
> There has been a great deal of effort to keep vhost and kvm untangled.
> One example is the memory translation it has to do, another one is the
> eventfd/irqfd thing it does just so it could signal an IRQ in the guest
> instead of accessing the guest directly.
Actually, CONFIG_VHOST_NET doesn't even depend on CONFIG_KVM, so your
patch will break build when (CONFIG_VHOST_NET=y && CONFIG_KVM=n).
--
Sasha.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
2011-12-16 7:40 ` Zang Hongyong
@ 2011-12-16 7:59 ` Sasha Levin
0 siblings, 0 replies; 14+ messages in thread
From: Sasha Levin @ 2011-12-16 7:59 UTC (permalink / raw)
To: Zang Hongyong
Cc: linux-kernel, mst, kvm, virtualization, netdev, xiaowei.yang,
hanweidong, wusongwei
On Fri, 2011-12-16 at 15:40 +0800, Zang Hongyong wrote:
> 于 2011/12/16,星期五 15:05, Sasha Levin 写道:
> > On Fri, 2011-12-16 at 13:32 +0800, zanghongyong@huawei.com wrote:
> >> From: Hongyong Zang<zanghongyong@huawei.com>
> >>
> >> Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
> >> to translate GPA to HVA. Since kernel's kvm structure already maintains the
> >> address relationship in its member *kvm_memslots*, these patches use kernel's
> >> kvm_memslots directly without the need of initialization and maintenance of
> >> vhost_memory.
> > Conceptually, vhost isn't aware of KVM - it's just a driver which moves
> > data from vq to a tap device and back. You can't simply add KVM specific
> > code into vhost.
> >
> > Whats the performance benefit?
> >
> But vhost-net is only used in virtualization situation. vhost_memory is
> maintained
> by user space qemu.
> In this way, the memory relationship can be accquired from kernel
> without the
> need of maintainence of vhost_memory from qemu.
You can't assume that vhost-* is used only along with qemu/kvm. Just as
virtio has more uses than just virtualization (heres one:
https://lkml.org/lkml/2011/10/25/139 ), there are more uses for vhost as
well.
There has been a great deal of effort to keep vhost and kvm untangled.
One example is the memory translation it has to do, another one is the
eventfd/irqfd thing it does just so it could signal an IRQ in the guest
instead of accessing the guest directly.
If you do see a great performance increase when tying vhost and KVM
together, it may be worth it to create some sort of an in-kernel
vhost-kvm bridging thing, but if the performance isn't noticeable we're
better off just leaving it as is and keeping the vhost code general.
--
Sasha.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
@ 2011-12-16 7:59 ` Sasha Levin
0 siblings, 0 replies; 14+ messages in thread
From: Sasha Levin @ 2011-12-16 7:59 UTC (permalink / raw)
To: Zang Hongyong
Cc: wusongwei, kvm, mst, netdev, hanweidong, linux-kernel,
virtualization, xiaowei.yang
On Fri, 2011-12-16 at 15:40 +0800, Zang Hongyong wrote:
> 于 2011/12/16,星期五 15:05, Sasha Levin 写道:
> > On Fri, 2011-12-16 at 13:32 +0800, zanghongyong@huawei.com wrote:
> >> From: Hongyong Zang<zanghongyong@huawei.com>
> >>
> >> Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
> >> to translate GPA to HVA. Since kernel's kvm structure already maintains the
> >> address relationship in its member *kvm_memslots*, these patches use kernel's
> >> kvm_memslots directly without the need of initialization and maintenance of
> >> vhost_memory.
> > Conceptually, vhost isn't aware of KVM - it's just a driver which moves
> > data from vq to a tap device and back. You can't simply add KVM specific
> > code into vhost.
> >
> > Whats the performance benefit?
> >
> But vhost-net is only used in virtualization situation. vhost_memory is
> maintained
> by user space qemu.
> In this way, the memory relationship can be accquired from kernel
> without the
> need of maintainence of vhost_memory from qemu.
You can't assume that vhost-* is used only along with qemu/kvm. Just as
virtio has more uses than just virtualization (heres one:
https://lkml.org/lkml/2011/10/25/139 ), there are more uses for vhost as
well.
There has been a great deal of effort to keep vhost and kvm untangled.
One example is the memory translation it has to do, another one is the
eventfd/irqfd thing it does just so it could signal an IRQ in the guest
instead of accessing the guest directly.
If you do see a great performance increase when tying vhost and KVM
together, it may be worth it to create some sort of an in-kernel
vhost-kvm bridging thing, but if the performance isn't noticeable we're
better off just leaving it as is and keeping the vhost code general.
--
Sasha.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
2011-12-16 7:05 ` Sasha Levin
(?)
(?)
@ 2011-12-16 7:40 ` Zang Hongyong
2011-12-16 7:59 ` Sasha Levin
-1 siblings, 1 reply; 14+ messages in thread
From: Zang Hongyong @ 2011-12-16 7:40 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, mst, kvm, virtualization, netdev, xiaowei.yang,
hanweidong, wusongwei
于 2011/12/16,星期五 15:05, Sasha Levin 写道:
> On Fri, 2011-12-16 at 13:32 +0800, zanghongyong@huawei.com wrote:
>> From: Hongyong Zang<zanghongyong@huawei.com>
>>
>> Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
>> to translate GPA to HVA. Since kernel's kvm structure already maintains the
>> address relationship in its member *kvm_memslots*, these patches use kernel's
>> kvm_memslots directly without the need of initialization and maintenance of
>> vhost_memory.
> Conceptually, vhost isn't aware of KVM - it's just a driver which moves
> data from vq to a tap device and back. You can't simply add KVM specific
> code into vhost.
>
> Whats the performance benefit?
>
But vhost-net is only used in virtualization situation. vhost_memory is
maintained
by user space qemu.
In this way, the memory relationship can be accquired from kernel
without the
need of maintainence of vhost_memory from qemu.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
2011-12-16 7:05 ` Sasha Levin
(?)
@ 2011-12-16 7:40 ` Zang Hongyong
-1 siblings, 0 replies; 14+ messages in thread
From: Zang Hongyong @ 2011-12-16 7:40 UTC (permalink / raw)
To: Sasha Levin
Cc: wusongwei, kvm, mst, netdev, hanweidong, linux-kernel,
virtualization, xiaowei.yang
于 2011/12/16,星期五 15:05, Sasha Levin 写道:
> On Fri, 2011-12-16 at 13:32 +0800, zanghongyong@huawei.com wrote:
>> From: Hongyong Zang<zanghongyong@huawei.com>
>>
>> Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
>> to translate GPA to HVA. Since kernel's kvm structure already maintains the
>> address relationship in its member *kvm_memslots*, these patches use kernel's
>> kvm_memslots directly without the need of initialization and maintenance of
>> vhost_memory.
> Conceptually, vhost isn't aware of KVM - it's just a driver which moves
> data from vq to a tap device and back. You can't simply add KVM specific
> code into vhost.
>
> Whats the performance benefit?
>
But vhost-net is only used in virtualization situation. vhost_memory is
maintained
by user space qemu.
In this way, the memory relationship can be accquired from kernel
without the
need of maintainence of vhost_memory from qemu.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
2011-12-16 5:32 zanghongyong
@ 2011-12-16 7:05 ` Sasha Levin
2011-12-16 7:05 ` Sasha Levin
1 sibling, 0 replies; 14+ messages in thread
From: Sasha Levin @ 2011-12-16 7:05 UTC (permalink / raw)
To: zanghongyong
Cc: linux-kernel, mst, kvm, virtualization, netdev, xiaowei.yang,
hanweidong, wusongwei
On Fri, 2011-12-16 at 13:32 +0800, zanghongyong@huawei.com wrote:
> From: Hongyong Zang <zanghongyong@huawei.com>
>
> Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
> to translate GPA to HVA. Since kernel's kvm structure already maintains the
> address relationship in its member *kvm_memslots*, these patches use kernel's
> kvm_memslots directly without the need of initialization and maintenance of
> vhost_memory.
Conceptually, vhost isn't aware of KVM - it's just a driver which moves
data from vq to a tap device and back. You can't simply add KVM specific
code into vhost.
Whats the performance benefit?
--
Sasha.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
@ 2011-12-16 7:05 ` Sasha Levin
0 siblings, 0 replies; 14+ messages in thread
From: Sasha Levin @ 2011-12-16 7:05 UTC (permalink / raw)
To: zanghongyong
Cc: wusongwei, kvm, mst, netdev, hanweidong, linux-kernel,
virtualization, xiaowei.yang
On Fri, 2011-12-16 at 13:32 +0800, zanghongyong@huawei.com wrote:
> From: Hongyong Zang <zanghongyong@huawei.com>
>
> Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
> to translate GPA to HVA. Since kernel's kvm structure already maintains the
> address relationship in its member *kvm_memslots*, these patches use kernel's
> kvm_memslots directly without the need of initialization and maintenance of
> vhost_memory.
Conceptually, vhost isn't aware of KVM - it's just a driver which moves
data from vq to a tap device and back. You can't simply add KVM specific
code into vhost.
Whats the performance benefit?
--
Sasha.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
2011-12-16 5:32 zanghongyong
@ 2011-12-16 7:05 ` Takuya Yoshikawa
2011-12-16 7:05 ` Sasha Levin
1 sibling, 0 replies; 14+ messages in thread
From: Takuya Yoshikawa @ 2011-12-16 7:05 UTC (permalink / raw)
To: zanghongyong
Cc: linux-kernel, mst, levinsasha928, kvm, virtualization, netdev,
xiaowei.yang, hanweidong, wusongwei
(2011/12/16 14:32), zanghongyong@huawei.com wrote:
> From: Hongyong Zang<zanghongyong@huawei.com>
>
> Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
> to translate GPA to HVA. Since kernel's kvm structure already maintains the
> address relationship in its member *kvm_memslots*, these patches use kernel's
> kvm_memslots directly without the need of initialization and maintenance of
> vhost_memory.
Isn't vhost independent from KVM?
Takuya
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
@ 2011-12-16 7:05 ` Takuya Yoshikawa
0 siblings, 0 replies; 14+ messages in thread
From: Takuya Yoshikawa @ 2011-12-16 7:05 UTC (permalink / raw)
To: zanghongyong
Cc: wusongwei, kvm, mst, netdev, hanweidong, linux-kernel,
virtualization, xiaowei.yang, levinsasha928
(2011/12/16 14:32), zanghongyong@huawei.com wrote:
> From: Hongyong Zang<zanghongyong@huawei.com>
>
> Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
> to translate GPA to HVA. Since kernel's kvm structure already maintains the
> address relationship in its member *kvm_memslots*, these patches use kernel's
> kvm_memslots directly without the need of initialization and maintenance of
> vhost_memory.
Isn't vhost independent from KVM?
Takuya
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
@ 2011-12-16 5:32 zanghongyong
2011-12-16 7:05 ` Takuya Yoshikawa
2011-12-16 7:05 ` Sasha Levin
0 siblings, 2 replies; 14+ messages in thread
From: zanghongyong @ 2011-12-16 5:32 UTC (permalink / raw)
To: linux-kernel
Cc: mst, levinsasha928, kvm, virtualization, netdev, xiaowei.yang,
hanweidong, wusongwei, Hongyong Zang
From: Hongyong Zang <zanghongyong@huawei.com>
Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
to translate GPA to HVA. Since kernel's kvm structure already maintains the
address relationship in its member *kvm_memslots*, these patches use kernel's
kvm_memslots directly without the need of initialization and maintenance of
vhost_memory.
Hongyong Zang (2):
kvm: Introduce get_kvm_from_task
vhost-net: Use kvm_memslots for address translation
drivers/vhost/vhost.c | 53 +++++++++++++++++----------------------------
include/linux/kvm_host.h | 2 +-
virt/kvm/kvm_main.c | 13 +++++++++++
3 files changed, 34 insertions(+), 34 deletions(-)
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-12-16 8:19 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 5:32 [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA zanghongyong
2011-12-16 5:32 zanghongyong
2011-12-16 7:05 ` Takuya Yoshikawa
2011-12-16 7:05 ` Takuya Yoshikawa
2011-12-16 7:05 ` Sasha Levin
2011-12-16 7:05 ` Sasha Levin
2011-12-16 7:40 ` Zang Hongyong
2011-12-16 7:40 ` Zang Hongyong
2011-12-16 7:59 ` Sasha Levin
2011-12-16 7:59 ` Sasha Levin
2011-12-16 8:07 ` Sasha Levin
2011-12-16 8:07 ` Sasha Levin
2011-12-16 8:18 ` Zang Hongyong
2011-12-16 8:18 ` Zang Hongyong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.