Re: [PATCH 1/2] hyperv: implement hv_get_tsc_page()

2017-02-09 Thread Stephen Hemminger
On Thu, 9 Feb 2017 21:14:25 +0100 (CET) Thomas Gleixner wrote: > On Thu, 9 Feb 2017, Stephen Hemminger wrote: > > > The actual code looks fine, but the style police will not like you. > > { should be at start of line on functions. > > And #else should be at start of line, > > > > But maybe this

Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-09 Thread Stephen Hemminger
On Thu, 9 Feb 2017 14:55:50 -0800 Andy Lutomirski wrote: > On Thu, Feb 9, 2017 at 12:45 PM, KY Srinivasan wrote: > > > > > >> -Original Message- > >> From: Thomas Gleixner [mailto:t...@linutronix.de] > >> Sent: Thursday, February 9, 2017 9:08 AM > >> To: Vitaly Kuznetsov > >> Cc: x...

Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-09 Thread Andy Lutomirski
On Thu, Feb 9, 2017 at 12:45 PM, KY Srinivasan wrote: > > >> -Original Message- >> From: Thomas Gleixner [mailto:t...@linutronix.de] >> Sent: Thursday, February 9, 2017 9:08 AM >> To: Vitaly Kuznetsov >> Cc: x...@kernel.org; Andy Lutomirski ; Ingo Molnar >> ; H. Peter Anvin ; KY Srinivasa

Re: [PATCH] virtio: Try to untangle DMA coherency

2017-02-09 Thread Alexander Graf
On 09/02/2017 21:57, Michael S. Tsirkin wrote: On Wed, Feb 08, 2017 at 01:58:10PM +0100, Alexander Graf wrote: On 02/01/2017 08:19 PM, Michael S. Tsirkin wrote: On Wed, Feb 01, 2017 at 06:27:09PM +, Will Deacon wrote: On Wed, Feb 01, 2017 at 08:09:21PM +0200, Michael S. Tsirkin wrote: O

Re: [PATCH] virtio: Try to untangle DMA coherency

2017-02-09 Thread Michael S. Tsirkin
On Wed, Feb 08, 2017 at 01:58:10PM +0100, Alexander Graf wrote: > On 02/01/2017 08:19 PM, Michael S. Tsirkin wrote: > > On Wed, Feb 01, 2017 at 06:27:09PM +, Will Deacon wrote: > > > On Wed, Feb 01, 2017 at 08:09:21PM +0200, Michael S. Tsirkin wrote: > > > > On Wed, Feb 01, 2017 at 12:25:57PM +

RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-09 Thread KY Srinivasan via Virtualization
> -Original Message- > From: Thomas Gleixner [mailto:t...@linutronix.de] > Sent: Thursday, February 9, 2017 9:08 AM > To: Vitaly Kuznetsov > Cc: x...@kernel.org; Andy Lutomirski ; Ingo Molnar > ; H. Peter Anvin ; KY Srinivasan > ; Haiyang Zhang ; Stephen > Hemminger ; Dexuan Cui > ; linu

RE: [PATCH 1/2] hyperv: implement hv_get_tsc_page()

2017-02-09 Thread Thomas Gleixner
On Thu, 9 Feb 2017, Stephen Hemminger wrote: > The actual code looks fine, but the style police will not like you. > { should be at start of line on functions. > And #else should be at start of line, > > But maybe this was just more of exchange mangling the mail. Looks like. > +struct ms_hyperv

Re: [PATCH] virtio: Try to untangle DMA coherency

2017-02-09 Thread Ard Biesheuvel
On 9 February 2017 at 18:49, Michael S. Tsirkin wrote: > On Thu, Feb 09, 2017 at 06:31:18PM +, Will Deacon wrote: >> On Thu, Feb 09, 2017 at 08:17:16PM +0200, Michael S. Tsirkin wrote: >> > On Thu, Feb 02, 2017 at 04:40:49PM +, Will Deacon wrote: >> > > On Thu, Feb 02, 2017 at 06:30:28PM +

Re: [PATCH] virtio: Try to untangle DMA coherency

2017-02-09 Thread Will Deacon
On Thu, Feb 09, 2017 at 08:49:41PM +0200, Michael S. Tsirkin wrote: > On Thu, Feb 09, 2017 at 06:31:18PM +, Will Deacon wrote: > > On Thu, Feb 09, 2017 at 08:17:16PM +0200, Michael S. Tsirkin wrote: > > > On Thu, Feb 02, 2017 at 04:40:49PM +, Will Deacon wrote: > > > > On Thu, Feb 02, 2017

Re: [PATCH] virtio: Try to untangle DMA coherency

2017-02-09 Thread Michael S. Tsirkin
On Thu, Feb 09, 2017 at 06:31:18PM +, Will Deacon wrote: > On Thu, Feb 09, 2017 at 08:17:16PM +0200, Michael S. Tsirkin wrote: > > On Thu, Feb 02, 2017 at 04:40:49PM +, Will Deacon wrote: > > > On Thu, Feb 02, 2017 at 06:30:28PM +0200, Michael S. Tsirkin wrote: > > > > I am inclined to say,

Re: [PATCH] virtio: Try to untangle DMA coherency

2017-02-09 Thread Michael S. Tsirkin
On Thu, Feb 02, 2017 at 04:40:49PM +, Will Deacon wrote: > On Thu, Feb 02, 2017 at 06:30:28PM +0200, Michael S. Tsirkin wrote: > > I am inclined to say, for 4.10 let's revert > > c7070619f3408d9a0dffbed9149e6f00479cf43b since what it fixes is not a > > regression in 4.10. > > No complaints the

Re: [PATCH] virtio: Try to untangle DMA coherency

2017-02-09 Thread Will Deacon
On Thu, Feb 09, 2017 at 08:17:16PM +0200, Michael S. Tsirkin wrote: > On Thu, Feb 02, 2017 at 04:40:49PM +, Will Deacon wrote: > > On Thu, Feb 02, 2017 at 06:30:28PM +0200, Michael S. Tsirkin wrote: > > > I am inclined to say, for 4.10 let's revert > > > c7070619f3408d9a0dffbed9149e6f00479cf43b

Re: packed ring layout proposal v2

2017-02-09 Thread Christian Borntraeger
On 02/09/2017 06:43 PM, Michael S. Tsirkin wrote: [...] >> [...] >>> Note: should this proposal be accepted and approved, one or more >>> claims disclosed to the TC admin and listed on the Virtio TC >>> IPR page https://www.oasis-open.org/committees/virtio/ipr.php >>> might becom

RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-09 Thread Stephen Hemminger via Virtualization
Why not use existing seqlock's? -Original Message- From: Thomas Gleixner [mailto:t...@linutronix.de] Sent: Thursday, February 9, 2017 9:08 AM To: Vitaly Kuznetsov Cc: x...@kernel.org; Andy Lutomirski ; Ingo Molnar ; H. Peter Anvin ; KY Srinivasan ; Haiyang Zhang ; Stephen Hemminger ;

RE: [PATCH 1/2] hyperv: implement hv_get_tsc_page()

2017-02-09 Thread Stephen Hemminger via Virtualization
The actual code looks fine, but the style police will not like you. { should be at start of line on functions. And #else should be at start of line, But maybe this was just more of exchange mangling the mail. -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Th

Re: [virtio-dev] packed ring layout proposal v2

2017-02-09 Thread Michael S. Tsirkin
On Thu, Feb 09, 2017 at 04:48:53PM +0100, Paolo Bonzini wrote: > > > On 08/02/2017 20:59, Michael S. Tsirkin wrote: > > We couldn't decide what's better for everyone in 1.0 days and I doubt > > we'll be able to now, but yes, benchmarking is needed to make > > sire it's required. Very easy to remo

Re: packed ring layout proposal v2

2017-02-09 Thread Michael S. Tsirkin
On Wed, Feb 08, 2017 at 02:37:57PM +0100, Christian Borntraeger wrote: > On 02/08/2017 04:20 AM, Michael S. Tsirkin wrote: > [...] > > * Prototype > > > > A partial prototype can be found under > > tools/virtio/ringtest/ring.c > > > > Test run: > > [mst@tuck ringtest]$ time ./ring > > real0m

Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-09 Thread Thomas Gleixner
On Thu, 9 Feb 2017, Vitaly Kuznetsov wrote: > +#ifdef CONFIG_HYPERV_TSCPAGE > +static notrace u64 vread_hvclock(int *mode) > +{ > + const struct ms_hyperv_tsc_page *tsc_pg = > + (const struct ms_hyperv_tsc_page *)&hvclock_page; > + u64 sequence, scale, offset, current_tick, cur_

Re: [virtio-dev] packed ring layout proposal v2

2017-02-09 Thread Cornelia Huck
On Thu, 9 Feb 2017 16:48:53 +0100 Paolo Bonzini wrote: > On 08/02/2017 20:59, Michael S. Tsirkin wrote: > > We couldn't decide what's better for everyone in 1.0 days and I doubt > > we'll be able to now, but yes, benchmarking is needed to make > > sire it's required. Very easy to remove or not to

Re: automatic IRQ affinity for virtio V3

2017-02-09 Thread Michael S. Tsirkin
On Thu, Feb 09, 2017 at 05:50:31AM -0800, Christoph Hellwig wrote: > On Sun, Feb 05, 2017 at 06:15:17PM +0100, Christoph Hellwig wrote: > > Hi Michael, hi Jason, > > > > This patches applies a few cleanups to the virtio PCI interrupt handling > > code, and then converts the virtio PCI code to use

Re: [virtio-dev] packed ring layout proposal v2

2017-02-09 Thread Paolo Bonzini
On 08/02/2017 20:59, Michael S. Tsirkin wrote: > We couldn't decide what's better for everyone in 1.0 days and I doubt > we'll be able to now, but yes, benchmarking is needed to make > sire it's required. Very easy to remove or not to use/support in > drivers/devices though. Fair enough, but of

[PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-09 Thread Vitaly Kuznetsov
Hyper-V TSC page clocksource is suitable for vDSO, however, the protocol defined by the hypervisor is different from VCLOCK_PVCLOCK. Implement the required support by adding hvclock_page VVAR. Signed-off-by: Vitaly Kuznetsov --- arch/x86/entry/vdso/vclock_gettime.c | 36

[PATCH 1/2] hyperv: implement hv_get_tsc_page()

2017-02-09 Thread Vitaly Kuznetsov
To use Hyper-V TSC page clocksource from vDSO we need to make tsc_pg available. Implement hv_get_tsc_page() and add CONFIG_HYPERV_TSCPAGE to make #ifdef-s simple. Signed-off-by: Vitaly Kuznetsov --- arch/x86/hyperv/hv_init.c | 9 +++-- arch/x86/include/asm/mshyperv.h | 8 driv

[PATCH 0/2] x86/vdso: Add Hyper-V TSC page clocksource support

2017-02-09 Thread Vitaly Kuznetsov
Hi, Hyper-V TSC page clocksource is suitable for vDSO, however, the protocol defined by the hypervisor is different from VCLOCK_PVCLOCK. Implemented the required support. Simple sysbench test shows the following results: Before: # time sysbench --test=memory --max-requests=50 run ... real

Re: automatic IRQ affinity for virtio V3

2017-02-09 Thread Christoph Hellwig
On Sun, Feb 05, 2017 at 06:15:17PM +0100, Christoph Hellwig wrote: > Hi Michael, hi Jason, > > This patches applies a few cleanups to the virtio PCI interrupt handling > code, and then converts the virtio PCI code to use the automatic MSI-X > vectors spreading, as well as using the information in