[Xen-devel] [RFC PATCH 05/13] xen-netback: refactor xenvif_rx_action

2015-05-12 Thread Joao Martins
Refactor xenvif_rx_action by dividing it into build_gops and submit, similar to what xenvif_tx_action looks like. Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netback/netback.c | 180 -- 1 file changed, 96 insertions(+), 84 deletions

[Xen-devel] [RFC PATCH 02/13] xen-netback: xenbus feature persistent support

2015-05-12 Thread Joao Martins
Checks for feature-persistent that indicates persistent grants support. Adds max_persistent_grants module param that specifies the max number of persistent grants, which if set to zero disables persistent grants. Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netback

[Xen-devel] [RFC PATCH 08/13] xen-netback: clone skb if skb-xmit_more is set

2015-05-12 Thread Joao Martins
: 0008 ---[ end trace b3caaf6875c8a975 ]--- Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netback/interface.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index dfe2b7b..5748ba5

[Xen-devel] [RFC PATCH 09/13] xen-netfront: move grant_{ref, page} to struct grant

2015-05-12 Thread Joao Martins
Refactors a little bit how grants are stored by moving grant_rx_ref/grant_tx_ref and grant_tx_page to its own structure, namely struct grant. Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netfront.c | 56 ++ 1 file changed, 32

[Xen-devel] [RFC PATCH 11/13] xen-netfront: feature-persistent xenbus support

2015-05-12 Thread Joao Martins
feature-persistent check on xenbus for persistent grants support on the backend. Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netfront.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index

[Xen-devel] [RFC PATCH 10/13] xen-netfront: refactor claim/release grant

2015-05-12 Thread Joao Martins
Refactors how grants are claimed/released/revoked by moving that code into claim_grant and release_grant helpers routines that can be shared in both TX/RX path. Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netfront.c | 87

[Xen-devel] [RFC PATCH 12/13] xen-netfront: implement TX persistent grants

2015-05-12 Thread Joao Martins
persistent grants since it would, otherwise, introduce the overhead of a memcpy on top of the grant map. Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netfront.c | 45 ++--- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git

[Xen-devel] [RFC PATCH 01/13] xen-netback: add persistent grant tree ops

2015-05-12 Thread Joao Martins
to map/unmap in case we try to fetch an already in use grant. This way we save a map (plus unmap on error) and prevent the error on add_persistent_gnt that would also lead towards dropping the packet. Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netback/common.h | 57

[Xen-devel] [RFC PATCH 00/13] Persistent grant maps for xen net drivers

2015-05-12 Thread Joao Martins
for comparison against future map/unmap improvements. Any comments or suggestions are welcome, Thanks! Joao [1] http://article.gmane.org/gmane.linux.network/249383 [2] http://bit.ly/1IhJfXD [3] http://lists.xen.org/archives/html/xen-devel/2015-02/msg02292.html Joao Martins (13): xen-netback: add persistent

Re: [Xen-devel] [RFC PATCH 00/13] Persistent grant maps for xen net drivers

2015-05-13 Thread Joao Martins
On 13 May 2015, at 12:50, David Vrabel david.vra...@citrix.com wrote: On 12/05/15 18:18, Joao Martins wrote: Packet I/O Tests: Measured on a Intel Xeon E5-1650 v2, Xen 4.5, no HT. Used pktgen burst 1 and clone_skbs 10 (to avoid alloc skb overheads) with various pkt sizes. All tests

[Xen-devel] [RFC PATCH 04/13] xen-netback: implement RX persistent grants

2015-05-12 Thread Joao Martins
) it goes up to 1.7 Mpps with persistent grants. This issue is addressed in later a commit, by copying the skb on xenvif_start_xmit() instead of going through the RX kthread. Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netback/common.h| 7 ++ drivers/net/xen-netback

[Xen-devel] [RFC PATCH 06/13] xen-netback: copy buffer on xenvif_start_xmit()

2015-05-12 Thread Joao Martins
Mpps (burst 2, pkt_size 64) compared to using the kthread. Maximum with grant copy is 1.2 Mpps, irrespective of the burst. All of this, measured on an Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz. Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netback/common.h| 2

[Xen-devel] [RFC PATCH 07/13] xen-netback: add persistent tree counters to debugfs

2015-05-12 Thread Joao Martins
Prints the total/max number of persistent grants and how many of them are in use. Signed-off-by: Joao Martins joao.mart...@neclab.eu --- drivers/net/xen-netback/xenbus.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback

Re: [Xen-devel] [RFC PATCH 09/13] xen-netfront: move grant_{ref, page} to struct grant

2015-05-19 Thread Joao Martins
On 18 May 2015, at 17:44, David Vrabel david.vra...@citrix.com wrote: On 12/05/15 18:18, Joao Martins wrote: Refactors a little bit how grants are stored by moving grant_rx_ref/grant_tx_ref and grant_tx_page to its own structure, namely struct grant. Reviewed-by: David Vrabel david.vra

Re: [Xen-devel] [RFC PATCH 11/13] xen-netfront: feature-persistent xenbus support

2015-05-19 Thread Joao Martins
On 18 May 2015, at 17:51, David Vrabel david.vra...@citrix.com wrote: On 12/05/15 18:18, Joao Martins wrote: feature-persistent check on xenbus for persistent grants support on the backend. You can't expose/check for this feature until you actually support it. This should probably

Re: [Xen-devel] [RFC PATCH 10/13] xen-netfront: refactor claim/release grant

2015-05-19 Thread Joao Martins
On 18 May 2015, at 17:48, David Vrabel david.vra...@citrix.com wrote: On 12/05/15 18:18, Joao Martins wrote: Refactors how grants are claimed/released/revoked by moving that code into claim_grant and release_grant helpers routines that can be shared in both TX/RX path. Reviewed-by: David

Re: [Xen-devel] [RFC PATCH 13/13] xen-netfront: implement RX persistent grants

2015-05-19 Thread Joao Martins
On 18 May 2015, at 18:04, David Vrabel david.vra...@citrix.com wrote: On 12/05/15 18:18, Joao Martins wrote: It allows a newly allocated skb to reuse the gref taken from the pending_ring, which means xennet will grant the pages once and release them only when freeing the device. It changes

Re: [Xen-devel] [RFC PATCH 12/13] xen-netfront: implement TX persistent grants

2015-05-19 Thread Joao Martins
On 18 May 2015, at 17:55, David Vrabel david.vra...@citrix.com wrote: On 12/05/15 18:18, Joao Martins wrote: Instead of grant/revoking the buffer related to the skb, it will use an already granted page and memcpy to it. The grants will be mapped by xen-netback and reused overtime, but only

Re: [Xen-devel] [RFC PATCH 03/13] xen-netback: implement TX persistent grants

2015-06-03 Thread Joao Martins
On 02 Jun 2015, at 16:53, Wei Liu wei.l...@citrix.com wrote: On Fri, May 22, 2015 at 10:24:39AM +, Joao Martins wrote: On 19 May 2015, at 17:23, Wei Liu wei.l...@citrix.com wrote: On Tue, May 12, 2015 at 07:18:27PM +0200, Joao Martins wrote: Introduces persistent grants for TX path

Re: [Xen-devel] [RFC PATCH 04/13] xen-netback: implement RX persistent grants

2015-06-03 Thread Joao Martins
On 02 Jun 2015, at 17:07, Wei Liu wei.l...@citrix.com wrote: On Fri, May 22, 2015 at 10:25:10AM +, Joao Martins wrote: On 19 May 2015, at 17:32, Wei Liu wei.l...@citrix.com wrote: On Tue, May 12, 2015 at 07:18:28PM +0200, Joao Martins wrote: It starts by doing a lookup in the tree

Re: [Xen-devel] [RFC PATCH 00/13] Persistent grant maps for xen net drivers

2015-05-29 Thread Joao Martins
...@lists.xen.org] On Behalf Of Joao Martins Sent: Friday, May 22, 2015 6:27 PM To: Wei Liu Cc: ian.campb...@citrix.com; net...@vger.kernel.org; david.vra...@citrix.com; xen-de...@lists.xenproject.org;boris.ostrov...@oracle.com Subject: Re: [Xen-devel] [RFC PATCH 00/13] Persistent grant maps

Re: [Xen-devel] [RFC PATCH 00/13] Persistent grant maps for xen net drivers

2015-05-22 Thread Joao Martins
On 19 May 2015, at 17:39, Wei Liu wei.l...@citrix.com wrote: On Tue, May 12, 2015 at 07:18:24PM +0200, Joao Martins wrote: There have been recently[3] some discussions and issues raised on persistent grants for the block layer, though the numbers above show some significant improvements

Re: [Xen-devel] [RFC PATCH 02/13] xen-netback: xenbus feature persistent support

2015-05-22 Thread Joao Martins
On 19 May 2015, at 17:19, Wei Liu wei.l...@citrix.com wrote: On Tue, May 12, 2015 at 07:18:26PM +0200, Joao Martins wrote: Checks for feature-persistent that indicates persistent grants support. Adds max_persistent_grants module param that specifies the max number of persistent grants, which

Re: [Xen-devel] [RFC PATCH 04/13] xen-netback: implement RX persistent grants

2015-05-22 Thread Joao Martins
On 19 May 2015, at 17:32, Wei Liu wei.l...@citrix.com wrote: On Tue, May 12, 2015 at 07:18:28PM +0200, Joao Martins wrote: It starts by doing a lookup in the tree for a gref. If no persistent grant is found on the tree, it will do grant copy and prepare the grant maps. Finally valides

Re: [Xen-devel] [RFC PATCH 03/13] xen-netback: implement TX persistent grants

2015-05-22 Thread Joao Martins
On 19 May 2015, at 17:23, Wei Liu wei.l...@citrix.com wrote: On Tue, May 12, 2015 at 07:18:27PM +0200, Joao Martins wrote: Introduces persistent grants for TX path which follows similar code path as the grant mapping. It starts by checking if there's a persistent grant available for header

Re: [Xen-devel] [RFC PATCH 06/13] xen-netback: copy buffer on xenvif_start_xmit()

2015-05-22 Thread Joao Martins
On 19 May 2015, at 17:35, Wei Liu wei.l...@citrix.com wrote: On Tue, May 12, 2015 at 07:18:30PM +0200, Joao Martins wrote: By introducing persistent grants we speed up the RX thread with the decreased copy cost, that leads to a throughput decrease of 20%. It is observed that the rx_queue

Re: [Xen-devel] [RFC PATCH 08/13] xen-netback: clone skb if skb-xmit_more is set

2015-05-22 Thread Joao Martins
On 19 May 2015, at 17:36, Wei Liu wei.l...@citrix.com wrote: On Tue, May 12, 2015 at 07:18:32PM +0200, Joao Martins wrote: On xenvif_start_xmit() we have an additional queue to the netback RX kthread that will sends the packet. When using burst1 pktgen sets skb-xmit_more to tell the driver

[Xen-devel] [PATCH v2 4/8] util: add virDiskNameParse to handle disk and partition idx

2015-11-10 Thread Joao Martins
Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- src/libvirt_private.syms | 1 + src/util/virutil.c | 41 +++ src/util/virutil.h | 1 + tests/utiltest.c | 56 4 files changed, 95

[Xen-devel] [PATCH v2 3/8] libxl: implement virDomainInterfaceStats

2015-11-10 Thread Joao Martins
statistics we resort to virNetInterfaceStats and let libvirt handle the platform specific nits. Note that the latter is not yet supported in FreeBSD. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Fill .ifname after domain start with generated name from libxl

[Xen-devel] [PATCH v2 7/8] libxl: implement virDomainGetJobInfo

2015-11-10 Thread Joao Martins
ource node and will return VIR_DOMAIN_JOB_NONE. Though nova handles this case and will migrate it properly instead of crashing. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - s/inexistent/nonexistent/g in commit message - s/estimed/estimated/g - Bump version to 1.2.2

[Xen-devel] [PATCH v2 5/8] libxl: implement virDomainBlockStats

2015-11-10 Thread Joao Martins
d benefit of getting the number of flush requests. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Fix identation issues - Set ret to LIBXL_VBD_SECTOR_SIZE - Reuse VIR_STRDUP error instead of doing virReportError when we fail to set stats->backend - Change vi

[Xen-devel] [PATCH v2 6/8] libxl: implement virConnectGetAllDomainStats

2015-11-10 Thread Joao Martins
Introduce support for connectGetAllDomainStats call that allow us to _all_ domain(s) statistics including network, block, cpus and memory. Changes are rather mechanical and mostly take care of the format to export the data. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes

[Xen-devel] [PATCH v2 0/8] libxl: domain statistics support

2015-11-10 Thread Joao Martins
with this series we get to support nova diagnostics. Tested this series on 4.4.3 and 4.5 setups plus Openstack Kilo. Individual patches contain the changelog and comments addressed since v1. Thanks! Joao Martins (8): libxl: implement virDomainGetCPUStats libxl: implement virDomainMemorystats

[Xen-devel] [PATCH v2 8/8] libxl: implement virDomainGetJobStats

2015-11-10 Thread Joao Martins
if the migration has been completed. But because we don't support completed jobs we will deliver an error. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Fixed indentation on libxlDomainGetJobStats() - s/estimed/estimated/g - Bump version to 1.2.22 --- src

[Xen-devel] [PATCH v2 1/8] libxl: implement virDomainGetCPUStats

2015-11-10 Thread Joao Martins
Introduce support for domainGetCPUStats API call and consequently allow us to use `virsh cpu-stats`. The latter returns a more brief output than the one provided by`virsh vcpuinfo`. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Remove libxl_vcpuinfo_d

[Xen-devel] [PATCH v2 2/8] libxl: implement virDomainMemorystats

2015-11-10 Thread Joao Martins
cooperation of the guest and thus currently not supported. We build on the data returned from libxl_domain_info and deliver it in the virDomainMemoryStat format. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Cleanup properly after error fetching domain

[Xen-devel] [PATCH v2] libxl: add p2p migration

2015-11-10 Thread Joao Martins
it is possible to migrate from a P2P to non-P2P host. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Move Begin step to libxlDoMigrateP2P to have all 4 steps together. - Remove if before VIR_FREE(dom_xml) --- src/libxl/libxl_driver.c| 13 ++- src

Re: [Xen-devel] [PATCH v3 1/8] libxl: implement virDomainGetCPUStats

2015-11-17 Thread Joao Martins
On 11/17/2015 02:59 AM, Jim Fehlig wrote: > On 11/13/2015 06:14 AM, Joao Martins wrote: >> Introduce support for domainGetCPUStats API call and consequently >> allow us to use `virsh cpu-stats`. The latter returns a more brief >> output than the one provided by`virsh vcpuin

Re: [Xen-devel] [PATCH] xen/x86: Adjust stack pointer in xen_sysexit

2015-11-17 Thread Joao Martins
On 11/16/2015 09:04 PM, Andy Lutomirski wrote: > On Mon, Nov 16, 2015 at 1:03 PM, Konrad Rzeszutek Wilk > wrote: >> On Mon, Nov 16, 2015 at 12:50:19PM -0800, Andy Lutomirski wrote: >>> On Mon, Nov 16, 2015 at 12:48 PM, Boris Ostrovsky >>>

Re: [Xen-devel] [PATCH v3 3/8] libxl: implement virDomainInterfaceStats

2015-11-17 Thread Joao Martins
On 11/17/2015 02:48 AM, Jim Fehlig wrote: > On 11/13/2015 06:14 AM, Joao Martins wrote: >> Introduce support for domainInterfaceStats API call for querying >> network interface statistics. Consequently it also enables the >> use of `virsh domifstat ` command. >&g

Re: [Xen-devel] [PATCH v3 2/8] libxl: implement virDomainMemorystats

2015-11-18 Thread Joao Martins
On 11/17/2015 11:15 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduce support for domainMemoryStats API call, which >> consequently enables the use of `virsh dommemstat` command to >> query for memory statistics of a domain. We support >> the following statisti

Re: [Xen-devel] [libvirt] [PATCH v3 1/8] libxl: implement virDomainGetCPUStats

2015-11-18 Thread Joao Martins
On 11/18/2015 05:33 PM, Jim Fehlig wrote: > On 11/16/2015 07:59 PM, Jim Fehlig wrote: >> On 11/13/2015 06:14 AM, Joao Martins wrote: >> @@ -5233,6 +5342,7 @@ static virHypervisorDriver libxlHypervisorDriver = { >> #endif >> .nodeGetFreeMemory = libxl

[Xen-devel] [PATCH v3 6/8] libxl: implement virConnectGetAllDomainStats

2015-11-13 Thread Joao Martins
Introduce support for connectGetAllDomainStats call that allow us to _all_ domain(s) statistics including network, block, cpus and memory. Changes are rather mechanical and mostly take care of the format to export the data. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes

[Xen-devel] [PATCH v3 4/8] util: add virDiskNameParse to handle disk and partition idx

2015-11-13 Thread Joao Martins
Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v2: - Sort the newly added symbol in the list --- src/libvirt_private.syms | 1 + src/util/virutil.c | 41 +++ src/util/virutil.h | 1 + tests/utiltes

[Xen-devel] [PATCH v3 0/8] libxl: domain statistics support

2015-11-13 Thread Joao Martins
. Individual patches contain the changelog and comments addressed since v1. Thanks! Joao Martins (8): libxl: implement virDomainGetCPUStats libxl: implement virDomainMemorystats libxl: implement virDomainInterfaceStats util: add virDiskNameParse to handle disk and partition idx libxl: implement

[Xen-devel] [PATCH v3 1/8] libxl: implement virDomainGetCPUStats

2015-11-13 Thread Joao Martins
Introduce support for domainGetCPUStats API call and consequently allow us to use `virsh cpu-stats`. The latter returns a more brief output than the one provided by`virsh vcpuinfo`. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Remove libxl_vcpuinfo_d

[Xen-devel] [PATCH v3 5/8] libxl: implement virDomainBlockStats

2015-11-13 Thread Joao Martins
d benefit of getting the number of flush requests. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Fix identation issues - Set ret to LIBXL_VBD_SECTOR_SIZE - Reuse VIR_STRDUP error instead of doing virReportError when we fail to set stats->backend - Change vi

[Xen-devel] [PATCH v3 3/8] libxl: implement virDomainInterfaceStats

2015-11-13 Thread Joao Martins
also skip these two steps in case the name of the interface was manually inserted by the adminstrator. For getting the interface statistics we resort to virNetInterfaceStats and let libvirt handle the platform specific nits. Note that the latter is not yet supported in FreeBSD. Signed-off-by: Jo

[Xen-devel] [PATCH v3 7/8] libxl: implement virDomainGetJobInfo

2015-11-13 Thread Joao Martins
ource node and will return VIR_DOMAIN_JOB_NONE. Though nova handles this case and will migrate it properly instead of crashing. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - s/inexistent/nonexistent/g in commit message - s/estimed/estimated/g - Bump version to 1.2.2

[Xen-devel] [PATCH v3 2/8] libxl: implement virDomainMemorystats

2015-11-13 Thread Joao Martins
cooperation of the guest and thus currently not supported. We build on the data returned from libxl_domain_info and deliver it in the virDomainMemoryStat format. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Cleanup properly after error fetching domain

[Xen-devel] [PATCH v3 8/8] libxl: implement virDomainGetJobStats

2015-11-13 Thread Joao Martins
if the migration has been completed. But because we don't support completed jobs we will deliver an error. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Fixed indentation on libxlDomainGetJobStats() - s/estimed/estimated/g - Bump version to 1.2.22 --- src

Re: [Xen-devel] [PATCH v2 2/2] libxl: implement virDomainInterfaceStats

2015-12-02 Thread Joao Martins
On Wed, Dec 02, 2015 at 11:50:41AM -0700, Jim Fehlig wrote: > On 12/02/2015 06:02 AM, Joao Martins wrote: > > > > On 12/02/2015 12:45 AM, Jim Fehlig wrote: > >> On 11/23/2015 11:57 AM, Joao Martins wrote: > >>> Introduce support for domainInterfaceStats

Re: [Xen-devel] [libvirt test] 65324: regressions - FAIL

2015-12-04 Thread Joao Martins
@gmail.com> > Christian Loehle <cloe...@linutronix.de> > Cole Robinson <crobi...@redhat.com> > Daniel P. Berrange <berra...@redhat.com> > Daniel Veillard <veill...@redhat.com> > Dmitry Andreev <dandr...@virtuozzo.com> > Erik Skultety &

[Xen-devel] [PATCH] libxl: free ifname on migration begin phase

2015-12-04 Thread Joao Martins
. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- src/libxl/libxl_domain.c| 32 ++-- src/libxl/libxl_domain.h| 3 +++ src/libxl/libxl_migration.c | 2 ++ 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/libxl/libxl_domain.c

[Xen-devel] [PATCH v2] libxl: free ifname on libxlDomainMigrationPrepareDef

2015-12-04 Thread Joao Martins
that we don't affect source domain (specially in cases when the migration fails), while still allowing interface stats to be consulted during the migration. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v1: - Commit message is changed - Clear ifnames on prepare

Re: [Xen-devel] [libvirt] [PATCH v2] libxl: free ifname on libxlDomainMigrationPrepareDef

2015-12-06 Thread Joao Martins
On 12/06/2015 06:11 PM, Jim Fehlig wrote: > On 12/06/2015 10:59 AM, Jim Fehlig wrote: >> On 12/06/2015 10:04 AM, Jim Fehlig wrote: >>> On 12/04/2015 12:45 PM, Joao Martins wrote: >>>> Commit d2e5538b1 changes virDomainDef to include ifnames >>>> that

Re: [Xen-devel] [PATCH v2] libxl: add p2p migration

2015-12-03 Thread Joao Martins
On 12/02/2015 11:27 PM, Jim Fehlig wrote: > On 11/10/2015 08:32 AM, Joao Martins wrote: >> Introduce support for VIR_MIGRATE_PEER2PEER in libxl driver >> for supporting migration in Openstack. Most of the changes >> occur at the source and no modifications at the receiv

Re: [Xen-devel] [PATCH v3 8/8] libxl: implement virDomainGetJobStats

2015-12-03 Thread Joao Martins
On 12/03/2015 06:48 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduces support for domainGetJobStats which has the same >> info as domainGetJobInfo but in a slightly different format. >> Another difference is that virDomainGetJobStats can also >> retriev

Re: [Xen-devel] [PATCH v2 2/2] libxl: implement virDomainInterfaceStats

2015-12-02 Thread Joao Martins
On 12/02/2015 12:45 AM, Jim Fehlig wrote: > On 11/23/2015 11:57 AM, Joao Martins wrote: >> Introduce support for domainInterfaceStats API call for querying >> network interface statistics. Consequently it also enables the >> use of `virsh domifstat ` command plus >>

Re: [Xen-devel] [PATCH v2 1/2] libxl: rename libxlConsoleCallback

2015-12-02 Thread Joao Martins
On 12/02/2015 12:08 AM, Jim Fehlig wrote: > On 11/23/2015 11:56 AM, Joao Martins wrote: >> . to a more generic name i.e. libxlDomainStartCallback, >> since it will now cover another case other than the console. >> >> Signed-off-by: Joao Martins <joao.m.mart...@or

Re: [Xen-devel] [PATCH] libxl: free ifname on migration begin phase

2015-12-04 Thread Joao Martins
On 12/04/2015 05:28 PM, Joao Martins wrote: > Commit d2e5538b1 changes virDomainDef to create ifnames > that are autogenerated by libxl, and also clearing them up > on domain cleanup. One place that was missing was also > on migration, when domain xml is sent to dst libvirtd and >

Re: [Xen-devel] [PATCH v2 06/14] x86/time.c: Scale host TSC in pvclock properly

2015-12-10 Thread Joao Martins
On 12/10/2015 12:23 AM, Haozhong Zhang wrote: > On 12/08/15 14:21, Boris Ostrovsky wrote: >> On 12/07/2015 08:52 PM, Haozhong Zhang wrote: >>> On 12/07/15 13:14, Boris Ostrovsky wrote: On 12/06/2015 03:58 PM, Haozhong Zhang wrote: > This patch makes the pvclock return the scaled host

Re: [Xen-devel] [PATCH RFC 3/3] xen/Kconfig: add XEN_TIME_VSYSCALL option

2016-01-04 Thread Joao Martins
On 01/04/2016 04:15 PM, Boris Ostrovsky wrote: > On 01/04/2016 11:12 AM, David Vrabel wrote: >> On 28/12/15 21:52, Joao Martins wrote: >>> This option enables support for pvclock vsyscall/vdso >>> support on Xen. Default is off, since Xen doesn't >>> expose

Re: [Xen-devel] [PATCH RFC 2/3] x86/xen/time: setup vcpu 0 time info page

2016-01-04 Thread Joao Martins
On 01/04/2016 04:07 PM, Boris Ostrovsky wrote: > On 12/28/2015 04:52 PM, Joao Martins wrote: >> + >> +static int xen_setup_vsyscall_time_info(int cpu) >> +{ >> +struct pvclock_vsyscall_time_info *ti; >> +struct vcpu_register_time_memory_area t; >> +

Re: [Xen-devel] [PATCH RFC 0/6] x86/time: PVCLOCK_TSC_STABLE_BIT support

2015-12-29 Thread Joao Martins
On 12/29/2015 02:58 PM, Andrew Cooper wrote: > On 28/12/2015 16:59, Joao Martins wrote: >> Hey! >> >> I've been working on pvclock vdso support on Linux guests, and came >> across Xen lacking support for PVCLOCK_TSC_STABLE_BIT flag which is >> required for

Re: [Xen-devel] [PATCH RFC 2/6] x86/time: implement tsc as clocksource

2015-12-29 Thread Joao Martins
On 12/29/2015 03:11 PM, Andrew Cooper wrote: > On 28/12/2015 16:59, Joao Martins wrote: >> Introduce support for using TSC as platform time which is the highest >> resolution time and most performant to get (~20 nsecs). Though there >> are also several problems asso

Re: [Xen-devel] [PATCH v2 06/14] x86/time.c: Scale host TSC in pvclock properly

2015-12-29 Thread Joao Martins
On 12/10/2015 11:56 AM, Joao Martins wrote: > > > On 12/10/2015 12:23 AM, Haozhong Zhang wrote: >> On 12/08/15 14:21, Boris Ostrovsky wrote: >>> On 12/07/2015 08:52 PM, Haozhong Zhang wrote: >>>> On 12/07/15 13:14, Boris Ostrovsky wrote: >>>&g

Re: [Xen-devel] [PATCH RFC 2/3] x86/xen/time: setup vcpu 0 time info page

2016-01-05 Thread Joao Martins
On 01/04/2016 09:34 PM, Boris Ostrovsky wrote: > On 01/04/2016 03:41 PM, Joao Martins wrote: >> >> On 01/04/2016 04:07 PM, Boris Ostrovsky wrote: >>> On 12/28/2015 04:52 PM, Joao Martins wrote: >>> >>>> + >>>> + size = PAGE_ALIG

[Xen-devel] [PATCH RFC 3/3] xen/Kconfig: add XEN_TIME_VSYSCALL option

2015-12-28 Thread Joao Martins
This option enables support for pvclock vsyscall/vdso support on Xen. Default is off, since Xen doesn't expose yet the PVCLOCK_TSC_STABLE_BIT flag. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- arch/x86/xen/Kconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/ar

[Xen-devel] [PATCH RFC 0/3] x86/xen: pvclock vdso support

2015-12-28 Thread Joao Martins
will probably be discussed in another RFC I sent[0]. Any comments or suggestions are welcome! Thanks, Joao [0] http://lists.xenproject.org/archives/html/xen-devel/2015-12/msg02835.html Joao Martins (3): x86/pvclock: add setter for pvclock_pvti_cpu0_va x86/xen/time: setup vcpu 0 time info page

[Xen-devel] [PATCH RFC 1/3] x86/pvclock: add setter for pvclock_pvti_cpu0_va

2015-12-28 Thread Joao Martins
and moves pvclock_pvti_cpu0_va to pvclock, which is a more generic place to have it; and would allow other PV clocksources to use it, such as Xen. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- arch/x86/include/asm/pvclock.h | 22 +- arch/x86/kernel/kvmclock.c |

[Xen-devel] [PATCH RFC 2/3] x86/xen/time: setup vcpu 0 time info page

2015-12-28 Thread Joao Martins
vcpu_time_info copy. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- arch/x86/xen/time.c | 66 include/xen/interface/vcpu.h | 28 +++ 2 files changed, 94 insertions(+) diff --git a/arch/x86/xen/time.c b/arch/x86/xen/

[Xen-devel] [PATCH RFC 3/6] x86/time: streamline platform time init on plt_init()

2015-12-28 Thread Joao Martins
And use to initialize platform time solely for clocksource=tsc, as opposed to initializing platform overflow timer, which would only fire in ~180 years (on 2.2 Ghz Broadwell processor). Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- xen/arch/x86/time.

[Xen-devel] [PATCH RFC 0/6] x86/time: PVCLOCK_TSC_STABLE_BIT support

2015-12-28 Thread Joao Martins
usage. I've been using it for a while in the past weeks with no issues so far though still requires testing on bad TSC machines. But I would like to get folks comments/suggestions if this is the correct approach in implementing this flag. Thanks! Joao Joao Martins (6): public/xen.h: add flags

[Xen-devel] [PATCH RFC 6/6] x86/time: convert counter to tsc for non-tsc clocksource

2015-12-28 Thread Joao Martins
, and under the assumption there is a considerable skew between platform timer and TSC. In my machine I was measuring between -15 and 40 us between HPET and TSC. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- xen/arch/x86/time.c | 13 +++-- 1 file changed, 11 insertions

[Xen-devel] [PATCH RFC 2/6] x86/time: implement tsc as clocksource

2015-12-28 Thread Joao Martins
100 ns. The warps still exist though but are only related to cross CPU calibration (being how much it takes to rendezvous with master), in which a later patch in this series aims to solve. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com>

[Xen-devel] [PATCH RFC 1/6] public/xen.h: add flags field to vcpu_time_info

2015-12-28 Thread Joao Martins
| | - Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- xen/include/public/xen.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index f

[Xen-devel] [PATCH RFC 4/6] x86/time: refactor read_platform_stime()

2015-12-28 Thread Joao Martins
To fetch the last read from the clocksource which was used to calculate system_time. In the case of clocksource=tsc we will use it to set tsc_timestamp. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- xen/arch/x86/time.c | 16 ++-- 1 file changed, 10 insertions

[Xen-devel] [PATCH RFC 5/6] x86/time: implement PVCLOCK_TSC_STABLE_BIT

2015-12-28 Thread Joao Martins
u B right after A is bigger independently of the VCPU calibration error. Since pvclock time infos are monotonic as seen by any vCPU we set PVCLOCK_TSC_STABLE_BIT flag, which then enables usage of VDSO on Linux. IIUC, this is similar to how it's implemented on KVM. Signed-off-by: Joao Mart

Re: [Xen-devel] [PATCH RFC 1/3] x86/pvclock: add setter for pvclock_pvti_cpu0_va

2015-12-29 Thread Joao Martins
On 12/28/2015 11:45 PM, Andy Lutomirski wrote: > On Mon, Dec 28, 2015 at 1:52 PM, Joao Martins <joao.m.mart...@oracle.com> > wrote: >> Right now there is only a pvclock_pvti_cpu0_va() which is defined on >> kvmclock since: >> >> commit dac16fba6fc5 >>

Re: [Xen-devel] [PATCH 3/3] libxl: implement virDomainInterfaceStats

2015-11-20 Thread Joao Martins
On 11/20/2015 07:25 PM, Jim Fehlig wrote: > On 11/19/2015 04:45 PM, Joao Martins wrote: >> Introduce support for domainInterfaceStats API call for querying >> network interface statistics. Consequently it also enables the >> use of `virsh domifstat ` command plus >>

Re: [Xen-devel] [PATCH 1/3] libxl: add libxl_domain_config to libxlDomainObjPrivate

2015-11-20 Thread Joao Martins
On 11/20/2015 07:05 PM, Jim Fehlig wrote: > On 11/19/2015 04:45 PM, Joao Martins wrote: > > You're not going to be happy with me... > >> This new field in libxlDomainObjPrivate is named "config" >> and is kept while the domain is active. > > Wh

[Xen-devel] [PATCH 1/3] libxl: add libxl_domain_config to libxlDomainObjPrivate

2015-11-19 Thread Joao Martins
This new field in libxlDomainObjPrivate is named "config" and is kept while the domain is active. For now, "config" will be used in libxlDomainStartCallback to set network interface names based on domid and libxl_device_nic devid that is set in the config on domain create.

[Xen-devel] [PATCH 2/3] libxl: rename libxlConsoleCallback

2015-11-19 Thread Joao Martins
. to a more generic name i.e. libxlDomainStartCallback, since it will now cover another case other than the console. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- src/libxl/libxl_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src

[Xen-devel] [PATCH 0/3] libxl: implement virDomainInterfaceStats

2015-11-19 Thread Joao Martins
something more generic and Patch 3 implements virDomainInterfaceStats also taking the previous review (v3 statistics) comments. Regards, Joao Joao Martins (3): libxl: add libxl_domain_config to libxlDomainObjPrivate libxl: Rename libxlConsoleCallback libxl: implement virDomainInterfaceStats

[Xen-devel] [PATCH 3/3] libxl: implement virDomainInterfaceStats

2015-11-19 Thread Joao Martins
FreeBSD. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v3: - Do not unlock vm if libxlDomainObjEndJob() returns false - Set vm->def->net[i]->ifname on DomainStartCallback instead of DomainStart. - Change commit message reflecting the changes on the

[Xen-devel] [PATCH v2 0/2] libxl: implement virDomainInterfaceStats

2015-11-23 Thread Joao Martins
lso taking the previous review (v3 statistics) comments. Changes since v1: - Improve error reporting in case interface is not known - Use libxl_device_nic_list as opposed to libxl_domain_config Regards, Joao Joao Martins (2): libxl: rename libxlConsoleCallback libxl: implement virDomainInterfaceS

[Xen-devel] [PATCH v2 2/2] libxl: implement virDomainInterfaceStats

2015-11-23 Thread Joao Martins
supported in FreeBSD. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- Changes since v3: - Use libxl_device_nic_list() for getting each network interface devid in DomainStartCallback. - Improve error reporting by appropriately setting the right error when no interface is

[Xen-devel] [PATCH v2 1/2] libxl: rename libxlConsoleCallback

2015-11-23 Thread Joao Martins
. to a more generic name i.e. libxlDomainStartCallback, since it will now cover another case other than the console. Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- src/libxl/libxl_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src

Re: [Xen-devel] [PATCH 1/3] libxl: add libxl_domain_config to libxlDomainObjPrivate

2015-11-23 Thread Joao Martins
On 11/23/2015 03:35 PM, Jim Fehlig wrote: > On 11/20/2015 05:40 PM, Joao Martins wrote: >> >> On 11/20/2015 07:05 PM, Jim Fehlig wrote: >>> On 11/19/2015 04:45 PM, Joao Martins wrote: >>> >>> You're not going to be happy with me... >>> &g

Re: [Xen-devel] [PATCH v3 5/8] libxl: implement virDomainBlockStats

2015-11-19 Thread Joao Martins
On 11/18/2015 07:01 PM, Jim Fehlig wrote: > On 11/13/2015 06:14 AM, Joao Martins wrote: >> Introduce initial support for domainBlockStats API call that >> allow us to query block device statistics. openstack nova >> uses this API call to query block statistics, alongside &g

Re: [Xen-devel] [PATCH v3 6/8] libxl: implement virConnectGetAllDomainStats

2015-11-19 Thread Joao Martins
On 11/18/2015 10:03 PM, Jim Fehlig wrote: > On 11/13/2015 06:14 AM, Joao Martins wrote: >> Introduce support for connectGetAllDomainStats call that >> allow us to _all_ domain(s) statistics including network, block, > > allows us to get > >> cpus and memory.

Re: [Xen-devel] BUG: NOW() seems to (sometimes) go backwards!

2016-06-09 Thread Joao Martins
Yet when the scaling values get set only once at boot, monotonic (cross-CPU) TSC means monotonic (cross-CPU) returns from NOW(). >>> Yep. And at this point, this is what needs to be verified, I guess... >> I think get_s_time_fixed doesn't guarantee monotonicity across CPUs being it

Re: [Xen-devel] BUG: NOW() seems to (sometimes) go backwards!

2016-06-09 Thread Joao Martins
On 06/09/2016 11:24 AM, Joao Martins wrote: >>>>> Yet when the scaling values get set only once at boot, monotonic >>>>> (cross-CPU) TSC means monotonic (cross-CPU) returns from NOW(). >>>>> >>>> Yep. And at this point, this is what need

Re: [Xen-devel] [PATCH] x86/time: use correct (local) time stamp in constant-TSC calibration fast path

2016-06-09 Thread Joao Martins
On 06/09/2016 01:01 PM, Jan Beulich wrote: > This looks like a copy and paste mistake in commit 1b6a99892d ("x86: > Simpler time handling when TSC is constant across all power saving > states"), responsible for occasional many-microsecond cross-CPU skew of > what NOW() returns. > > Also improve

Re: [Xen-devel] BUG: NOW() seems to (sometimes) go backwards!

2016-06-08 Thread Joao Martins
On 06/08/2016 02:43 PM, Dario Faggioli wrote: > On Wed, 2016-06-08 at 04:42 -0600, Jan Beulich wrote: > On 07.06.16 at 17:54, wrote: >>> So, it looks to me that the TSC is actually ok, and it could be the >>> local_tsc_stamp and scale_delta() magic done in

Re: [Xen-devel] [PATCH] x86/time: use correct (local) time stamp in constant-TSC calibration fast path

2016-06-10 Thread Joao Martins
On 06/10/2016 10:29 AM, Jan Beulich wrote: On 10.06.16 at 08:59, wrote: >> Actually, since local time gets seeded from platform time in >> init_percpu_time(), I don't think we can do away with >> maintaining platform time. > Yeah, I agree. But the case of my previous

Re: [Xen-devel] [PATCH] x86/time: use correct (local) time stamp in constant-TSC calibration fast path

2016-06-09 Thread Joao Martins
[changing Dario address to citrix.com as it was bouncing for me ] On 06/09/2016 04:52 PM, Jan Beulich wrote: On 09.06.16 at 17:00, wrote: >> On 06/09/2016 01:57 PM, Jan Beulich wrote: >> On 09.06.16 at 14:11, wrote: >>> So in effect

Re: [Xen-devel] [PATCH 1/8] x86/time: improve cross-CPU clock monotonicity (and more)

2016-06-21 Thread Joao Martins
tire description) they don't even discuss whether this > indeed eliminates _all_ apparent backward moves due to effects > like the ones named above. > > Plus, the contention they're facing is limited to a single VM, i.e. likely > much more narrow than that on an entire physical system.

Re: [Xen-devel] [PATCH 1/8] x86/time: improve cross-CPU clock monotonicity (and more)

2016-06-16 Thread Joao Martins
>>> +unsigned long flags; >>> +u64 tsc; >>> + >>> +local_irq_save(flags); >>> +ap_bringup_ref.master_stime = read_platform_stime(); >>> +tsc = rdtsc(); >>> +local_irq_restore(flags); >>> + >>> +ap_bringup_ref.local_stime = get_s_time_fixed(tsc); >>> +} >>> + >>> void

  1   2   3   4   >