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

2015-11-13 Thread Joao Martins
e 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 --- Changes since v1: - s/inexistent/nonexistent/g in commit message - s/estimed/estimated/g - Bump version to 1.2.22 --- src/libxl/libx

[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 --- Changes since v1: - Cleanup properly after error fetching domain stats - Dispose libxl_dominfo after

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

2015-11-13 Thread Joao Martins
migration has been completed. But because we don't support completed jobs we will deliver an error. Signed-off-by: Joao Martins --- Changes since v1: - Fixed indentation on libxlDomainGetJobStats() - s/estimed/estimated/g - Bump version to 1.2.22 --- src/libxl/libxl_driver.c

[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 --- Changes since v1: - Rework flags

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

2015-11-13 Thread Joao Martins
ned-off-by: Joao Martins --- 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/utiltest.c | 56 +

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

2015-11-13 Thread Joao Martins
stack Kilo. 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:

[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 --- Changes since v1: - Remove libxl_vcpuinfo_dispose() in favor or using

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

2015-11-13 Thread Joao Martins
ed benefit of getting the number of flush requests. Signed-off-by: Joao Martins --- 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 virAsprintf(...) error

[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-b

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 >>> wrote: On 11/16/2015 03:22 PM, Borislav Petkov wrot

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 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] [PATCH v3 3/8] libxl: implement virDomainInterfaceStats

2015-11-18 Thread Joao Martins
On 11/17/2015 11:38 PM, Jim Fehlig wrote: > Joao Martins wrote: >> >> 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 in

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

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. Cha

[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 --- src/libxl/libxl_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl

[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
n FreeBSD. Signed-off-by: Joao Martins --- 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 previous item and mention

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. > &g

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

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

2015-11-23 Thread Joao Martins
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 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 --- src/libxl/libxl_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl

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

2015-11-23 Thread Joao Martins
yet supported in FreeBSD. Signed-off-by: Joao Martins --- 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 known. - Do not unlock vm if libxl

Re: [Xen-devel] [libvirt] [FOR 1.3.0 PATCH] conf: add net device prefix for Xen

2016-02-24 Thread Joao Martins
On 02/24/2016 04:31 AM, Jim Fehlig wrote: > On 02/22/2016 04:15 PM, Joao Martins wrote: >> >> On 12/08/2015 04:06 PM, Jim Fehlig wrote: >>> Daniel P. Berrange wrote: >>>> On Mon, Dec 07, 2015 at 10:59:32PM -0700, Jim Fehlig wrote: >>>>> On 12/07

Re: [Xen-devel] What time is it kvm-clock?

2016-02-25 Thread Joao Martins
On 02/24/2016 07:55 PM, Owen Hofmann wrote: not-really-well-defined hybrid? --Andy >>> >>> 1. What is not well defined? I fail to spot anything >>> specific in Owen's e-mail. >> >> If I start a guest and query kvm-clock, I get a nanosecond count. >> AFAIK it is, in fact, ill-defined

Re: [Xen-devel] [PATCH RFC 1/8] x86/hvm: set initial apicid to vcpu_id

2016-03-02 Thread Joao Martins
On 02/25/2016 05:03 PM, Jan Beulich wrote: On 22.02.16 at 22:02, wrote: >> Currently the initial_apicid is set vcpu_id * 2 which makes it difficult >> for the toolstack to manage how is the topology seen by the guest. >> Instead of forcing procpkg and proccount to be VCPUID * 2, instead we >>

Re: [Xen-devel] [PATCH RFC 2/8] libxl: remove whitespace on libxl_types.idl

2016-03-02 Thread Joao Martins
On 02/25/2016 04:28 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 09:02:08PM +0000, Joao Martins wrote: >> Signed-off-by: Joao Martins > > Acked-by: Wei Liu > Thanks! >> --- >> CC: Ian Jackson >> CC: Stefano Stabellini >> CC: Ian Campbe

Re: [Xen-devel] [PATCH RFC 4/8] libxl: cpuid: add guest topology support

2016-03-02 Thread Joao Martins
On 02/25/2016 04:29 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 09:02:10PM +0000, Joao Martins wrote: >> Introduce internal cpuid routine for setting the topology >> as seen by the guest. The topology is made based on >> leaf 1 and leaf 4 for Intel, more specifically set

Re: [Xen-devel] [PATCH RFC 7/8] libxl: introduce topology fields

2016-03-02 Thread Joao Martins
On 02/25/2016 04:29 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 09:02:13PM +0000, Joao Martins wrote: >> Currently there is "smt" option that changes from a flat core topology >> to a core+thread topology. This patch adds more expressive options for >> describing th

Re: [Xen-devel] [PATCH RFC 0/8] x86/hvm, libxl: HVM SMT topology support

2016-03-02 Thread Joao Martins
On 02/25/2016 05:21 PM, Andrew Cooper wrote: > On 22/02/16 21:02, Joao Martins wrote: >> Hey! >> >> This series are a follow-up on the thread about the performance >> of hard-pinned HVM guests. Here we propose allowing libxl to >> change how the CPU topology lo

Re: [Xen-devel] [PATCH RFC 0/8] x86/hvm, libxl: HVM SMT topology support

2016-03-03 Thread Joao Martins
On 03/02/2016 08:03 PM, Andrew Cooper wrote: > On 02/03/16 19:18, Joao Martins wrote: >> >> On 02/25/2016 05:21 PM, Andrew Cooper wrote: >>> On 22/02/16 21:02, Joao Martins wrote: >>>> Hey! >>>> >>>> This series are a follow-up on the

Re: [Xen-devel] [PATCH RFC 0/8] x86/hvm, libxl: HVM SMT topology support

2016-03-03 Thread Joao Martins
On 03/03/2016 10:24 AM, Andrew Cooper wrote: > On 03/03/16 09:52, Joao Martins wrote: >> >>>>> In particular, I am concerned about giving the toolstack the ability to >>>>> blindly control the APIC IDs. Their layout is very closely linked to >>&g

Re: [Xen-devel] [libvirt] [PATCH V2 1/4] conf: add 'state' attribute to feature

2016-03-08 Thread Joao Martins
@@ - - - + Other that, Reviewed-by: Joao Martins > > > > diff --git a/src/conf/domain_co

Re: [Xen-devel] [libvirt] [PATCH V2 2/4] xenconfig: change 'hap' setting to align with Xen behavior

2016-03-08 Thread Joao Martins
t; pae = 1 > acpi = 1 > apic = 1 > -hap = 0 > viridian = 0 > rtc_timeoffset = 0 > localtime = 0 > diff --git a/tests/xmconfigdata/test-fullvirt-sound.cfg > b/tests/xmconfigdata/test-fullvirt-sound.cfg > index c11336a..6747e69 100644 > --- a/tests/xmconfigdata/test-fullvirt-sound.cfg > +++ b/tests/xmconfigdata/test-fullvirt-sound.cfg > @@ -6,7 +6,6 @@ vcpus = 1 > pae = 1 > acpi = 1 > apic = 1 > -hap = 0 > viridian = 0 > rtc_timeoffset = 0 > localtime = 0 > diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg > b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg > index 33738ad..c7eb1c1 100755 > --- a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg > +++ b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg > @@ -6,7 +6,6 @@ vcpus = 1 > pae = 1 > acpi = 1 > apic = 1 > -hap = 0 > viridian = 0 > rtc_timeoffset = 0 > localtime = 0 > diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg > b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg > index 8e222bb..8921e7c 100755 > --- a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg > +++ b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg > @@ -6,7 +6,6 @@ vcpus = 1 > pae = 1 > acpi = 1 > apic = 1 > -hap = 0 > viridian = 0 > rtc_timeoffset = 0 > localtime = 0 > diff --git a/tests/xmconfigdata/test-fullvirt-utc.cfg > b/tests/xmconfigdata/test-fullvirt-utc.cfg > index 67e2511..5e12c5e 100755 > --- a/tests/xmconfigdata/test-fullvirt-utc.cfg > +++ b/tests/xmconfigdata/test-fullvirt-utc.cfg > @@ -6,7 +6,6 @@ vcpus = 1 > pae = 1 > acpi = 1 > apic = 1 > -hap = 0 > viridian = 0 > rtc_timeoffset = 0 > localtime = 0 > diff --git a/tests/xmconfigdata/test-no-source-cdrom.cfg > b/tests/xmconfigdata/test-no-source-cdrom.cfg > index 7098005..4240429 100644 > --- a/tests/xmconfigdata/test-no-source-cdrom.cfg > +++ b/tests/xmconfigdata/test-no-source-cdrom.cfg > @@ -6,7 +6,6 @@ vcpus = 1 > pae = 1 > acpi = 1 > apic = 1 > -hap = 0 > viridian = 0 > rtc_timeoffset = 0 > localtime = 0 > diff --git a/tests/xmconfigdata/test-pci-devs.cfg > b/tests/xmconfigdata/test-pci-devs.cfg > index 777314f..1369b32 100644 > --- a/tests/xmconfigdata/test-pci-devs.cfg > +++ b/tests/xmconfigdata/test-pci-devs.cfg > @@ -6,7 +6,6 @@ vcpus = 1 > pae = 1 > acpi = 1 > apic = 1 > -hap = 0 > viridian = 0 > rtc_timeoffset = 0 > localtime = 0 > diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c > index a5c718b..9b21a13 100644 > --- a/tests/xmconfigtest.c > +++ b/tests/xmconfigtest.c > @@ -235,6 +235,7 @@ mymain(void) > > DO_TEST("fullvirt-force-hpet"); > DO_TEST("fullvirt-force-nohpet"); > +DO_TEST("fullvirt-nohap"); > > DO_TEST("fullvirt-parallel-tcp"); > > Reviewed-by: Joao Martins ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [libvirt] [PATCH V2 4/4] libxl: support enabling and disabling feature

2016-03-08 Thread Joao Martins
On 03/01/2016 04:00 AM, Jim Fehlig wrote: > Until now, the libxl driver ignored any setting in domain XML > and deferred to libxl, which enables hap if not specified. While > this is a good default, it prevents disabling hap if desired. > > This change allows disabling hap with . hap is > expli

Re: [Xen-devel] [libvirt] [PATCH V2 3/4] Xen drivers: show hap enabled by default in capabilities

2016-03-08 Thread Joao Martins
", > - false, > + true, > true) == NULL) > goto no_memory; > > For the libxl part, Reviewed-by: Joao Martins ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v3 15/28] x86/cpu: Sysctl and common infrastructure for levelling context switching

2016-03-15 Thread Joao Martins
On 03/15/2016 03:35 PM, Andrew Cooper wrote: > A toolstack needs to know how much control Xen has over the visible cpuid > values in PV guests. Provide an explicit mechanism to query what Xen is > capable of. > > This interface will currently report no capabilities. This change is > scaffoldin

Re: [Xen-devel] [PATCH v3 15/28] x86/cpu: Sysctl and common infrastructure for levelling context switching

2016-03-15 Thread Joao Martins
On 03/15/2016 07:29 PM, Andrew Cooper wrote: > On 15/03/16 17:35, Joao Martins wrote: >> >> On 03/15/2016 03:35 PM, Andrew Cooper wrote: >>> A toolstack needs to know how much control Xen has over the visible cpuid >>> values in PV guests. Provide an explic

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

2016-03-19 Thread Joao Martins
ead on vcpu B right after A is bigger independently of the VCPU calibration error. Since pvclock time infos are monotonic as seen by any vCPU set PVCLOCK_TSC_STABLE_BIT, which then enables usage of VDSO on Linux. IIUC, this is similar to how it's implemented on KVM. Signed-off-by: Joao Mar

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

2016-03-19 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 --- Cc: Keir Fraser Cc: Jan Beulich Cc: Andrew Cooper Changes since RFC

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

2016-03-19 Thread Joao Martins
arp < 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 --- Cc: Keir Fraser Cc: Jan Beulich Cc: Andrew Cooper Changes sinc

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

2016-03-19 Thread Joao Martins
host | | - Signed-off-by: Joao Martins Reviewed-by: Konrad Rzeszutek Wilk --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- xen/include/public/xen.h | 6 +- 1 file changed, 5 insertions(+), 1 del

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

2016-03-19 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 --- Cc: Keir Fraser Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/time.c | 16 ++-- 1 file

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 get_s_time_fixed() >>> (which, AFAICU

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] [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:57 PM, Jan Beulich wrote: On 09.06.16 at 14:11, wrote: >> 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

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 for the fast path the patch >>> changes the situation

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 message was towards impro

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

2016-06-15 Thread Joao Martins
On 06/15/2016 11:26 AM, Jan Beulich wrote: > --- a/xen/arch/x86/time.c > +++ b/xen/arch/x86/time.c > @@ -1328,21 +1328,51 @@ static void time_calibration(void *unuse > &r, 1); > } > > +static struct { > +s_time_t local_stime, master_stime; > +} ap_bringup_ref; > + > +vo

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 in

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

2016-06-21 Thread Joao Martins
; through the entire 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

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

2016-06-21 Thread Joao Martins
{ >>>> if (ret < last) >>>> return last; >>>> last = atomic64_cmpxchg(&last_value, last, ret); >>>> } while (unlikely(last != ret)); >>>> -- >>> >>> Meaning they decided it's worth the overhead

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

2015-05-12 Thread Joao Martins
ck 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 --- drivers/net/xen-netback/common.h | 57 +++ driver

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

2015-05-12 Thread Joao Martins
ially on more network intensive workloads and provide a margin 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/

[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 --- drivers/net/xen-netback/comm

[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 --- drivers/net/xen-netback/netback.c | 180 -- 1 file changed, 96 insertions(+), 84 deletions(-) diff --git a

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

2015-05-12 Thread Joao Martins
mU to Dom0. Tests ran on a Intel Xeon E5-1650 v2 with HT disabled. Signed-off-by: Joao Martins --- drivers/net/xen-netback/common.h| 12 ++ drivers/net/xen-netback/interface.c | 46 + drivers/net/xen-netback/netback.c | 341 +++- 3 files changed

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

2015-05-12 Thread Joao Martins
,4 and 8) 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 --- drivers/net/xen-netback/common.h| 7 ++ drivers/net/xen-netback/interface

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

2015-05-12 Thread Joao Martins
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 --- drivers/net/xen-netback/common.h| 2 ++ drivers/net/xen-netback/interface.c | 11 +--- drivers/net/xen-netback/net

[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 --- 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/xenbus.c index 766f7e5

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

2015-05-12 Thread Joao Martins
0 00 48 83 05 84 f5 00 00 01 <48> 89 42 08 48 89 10 41 8b 84 24 80 00 00 00 29 83 2c ba 00 00 RIP [] xenvif_rx_dequeue+0x7c/0x120 [xen_netback] RSP CR2: 0008 ---[ end trace b3caaf6875c8a975 ]--- Signed-off-by: Joao Martins --- drivers/net/xen-netback/interface.c | 9 +

[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 --- drivers/net/xen-netfront.c | 56 ++ 1 file changed, 32 insertions(+), 24

[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 --- 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 99c17c

[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 --- drivers/net/xen-netfront.c | 87 ++ 1 file changed, 58

[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 --- drivers/net/xen-netfront.c | 45 ++--- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/drivers/net/xen-netfront.c

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

2015-05-12 Thread Joao Martins
frags, there will be a memcpy on skb_copy_ubufs() (if frags bigger than 0). Depending on the CPU and number of queues this leads to a performance drop of between 7-11%. For this reason, SKBTX_DEV_ZEROCOPY skbs will only be used with persistent grants. Signed-off-by: Joao Martins --- drivers/net

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 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 sk

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 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:

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 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. >

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 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. > >

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 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 o

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 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

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 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 per

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 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 vali

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 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 g

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 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_

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 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 i

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 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 burst>1 pktgen sets >> skb->xmit_more to

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

2015-05-29 Thread Joao Martins
.@lists.xen.org > [mailto:xen-devel-boun...@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:

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 wrote: > On Fri, May 22, 2015 at 10:25:10AM +0000, Joao Martins wrote: >> >> On 19 May 2015, at 17:32, Wei Liu wrote: >> >>> On Tue, May 12, 2015 at 07:18:28PM +0200, Joao Martins wrote: >>>> It starts by do

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 wrote: > On Fri, May 22, 2015 at 10:24:39AM +0000, Joao Martins wrote: >> >> On 19 May 2015, at 17:23, Wei Liu wrote: >>> On Tue, May 12, 2015 at 07:18:27PM +0200, Joao Martins wrote: >>>> Introduces persistent grants fo

Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping

2016-07-07 Thread Joao Martins
On 07/05/2016 04:44 PM, Jan Beulich wrote: On 05.07.16 at 17:34, wrote: >> On Thu, Jun 30, 2016 at 03:10:11AM -0600, Jan Beulich wrote: >> On 29.06.16 at 18:27, wrote: On 29/06/16 17:19, Vitaly Kuznetsov wrote: > To explain better what I'm trying to suggest here please take a lo

Re: [Xen-devel] [DRAFT 1] XenSock protocol design document

2016-07-11 Thread Joao Martins
On 07/08/2016 12:23 PM, Stefano Stabellini wrote: > Hi all, > Hey! [...] > > ## Design > > ### Xenstore > > The frontend and the backend connect to each other exchanging information via > xenstore. The toolstack creates front and back nodes with state > XenbusStateInitialising. There can only

Re: [Xen-devel] [libvirt bisection] complete build-i386-libvirt

2016-07-15 Thread Joao Martins
On 07/15/2016 02:02 PM, osstest service owner wrote: > branch xen-unstable > xenbranch xen-unstable > job build-i386-libvirt > testid libvirt-build > > Tree: libvirt git://libvirt.org/libvirt.git > Tree: libvirt_gnulib git://git.sv.gnu.org/gnulib.git > Tree: qemu git://xenbits.xen.org/qemu-xen-tra

Re: [Xen-devel] [PATCH v3 2/3] libxl: move begin phase job handling

2016-02-02 Thread Joao Martins
On 02/02/2016 01:23 AM, Jim Fehlig wrote: > On 01/20/2016 12:00 PM, Joao Martins wrote: >> . From libxlMigrationBegin to libxlDomainMigrateBegin3Params(). >> This is a preparatory patch to be able to begin a job in the >> perform phase. >> >> Signed-off-by: J

Re: [Xen-devel] [PATCH v3 2/3] libxl: move begin phase job handling

2016-02-02 Thread Joao Martins
On 02/02/2016 03:39 PM, Jim Fehlig wrote: > Joao Martins wrote: >> >> On 02/02/2016 01:23 AM, Jim Fehlig wrote: >>> On 01/20/2016 12:00 PM, Joao Martins wrote: >>>> . From libxlMigrationBegin to libxlDomainMigrateBegin3Params(). >>>> This is a pr

Re: [Xen-devel] [PATCH v3 1/3] libxl: add p2p migration

2016-02-03 Thread Joao Martins
On 02/02/2016 11:41 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduce support for VIR_MIGRATE_PEER2PEER in libvirt migration. >> Most of the changes occur at the source and no modifications >> at the receiver. >> >> In P2P mode there is only the Perfo

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

2016-02-05 Thread Joao Martins
2 days > Failing since 80382 2016-02-04 04:29:24 Z1 days2 attempts > Testing same since80615 2016-02-05 04:38:19 Z0 days1 attempts > > ---- > People who touched revisions under test: > Daniel P. Berrange > Dmitry Andreev > Erik Skultety >

[Xen-devel] [PATCH v4 1/2] libxl: add p2p migration

2016-02-05 Thread Joao Martins
ence thus it is possible to migrate from a P2P to non-P2P host. Signed-off-by: Joao Martins --- Note: v4 series requires the patch ("remote: set VIR_TYPED_PARAM_STRING_OKAY on migration") [0] to make migration work again, but it's not reviewed yet. [https://www.redhat.com/archives/libv

[Xen-devel] [PATCH v4 2/2] libxl: keepalive messages support

2016-02-05 Thread Joao Martins
few simplifications. Signed-off-by: Joao Martins --- Note: v4 series requires the patch ("remote: set VIR_TYPED_PARAM_STRING_OKAY on migration") to make migration work again, but it's not reviewed yet. [https://www.redhat.com/archives/libvir-list/2016-February/msg00317.html

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

2016-02-09 Thread Joao Martins
6 days > Failing since 80382 2016-02-04 04:29:24 Z5 days5 attempts > Testing same since81366 2016-02-08 09:14:32 Z1 days1 attempts > > -------- > People who touched revisions under test: > Cole Robinson > Daniel P. Berrange > Dmitry Andre

Re: [Xen-devel] [PATCH v2 05/30] xen/public: Export cpu featureset information in the public API

2016-02-19 Thread Joao Martins
On 02/05/2016 01:41 PM, Andrew Cooper wrote: > For the featureset to be a useful object, it needs a stable interpretation, a > property which is missing from the current hw_caps interface. > > Additionly, introduce TSC_ADJUST, SHA, PREFETCHWT1, ITSC, EFRO and CLZERO > which will be used by later c

Re: [Xen-devel] [PATCH v2 05/30] xen/public: Export cpu featureset information in the public API

2016-02-19 Thread Joao Martins
On 02/19/2016 05:55 PM, Andrew Cooper wrote: > On 19/02/16 17:29, Joao Martins wrote: >> On 02/05/2016 01:41 PM, Andrew Cooper wrote: >>> For the featureset to be a useful object, it needs a stable interpretation, >>> a >>> property which is missin

Re: [Xen-devel] [PATCH v2 05/30] xen/public: Export cpu featureset information in the public API

2016-02-20 Thread Joao Martins
On 02/20/2016 04:17 PM, Andrew Cooper wrote: > On 19/02/16 22:03, Joao Martins wrote: >> On 02/19/2016 05:55 PM, Andrew Cooper wrote: >>> On 19/02/16 17:29, Joao Martins wrote: >>>> On 02/05/2016 01:41 PM, Andrew Cooper wrote: >>>>> For the featur

<    1   2   3   4   >