From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932318AbcFJJrS (ORCPT ); Fri, 10 Jun 2016 05:47:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43605 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700AbcFJJrP (ORCPT ); Fri, 10 Jun 2016 05:47:15 -0400 From: Vitaly Kuznetsov To: devel@linuxdriverproject.org Cc: linux-kernel@vger.kernel.org, "K. Y. Srinivasan" , Haiyang Zhang Subject: [PATCH 0/4] Drivers: hv: ring_buffer: make in-place consumption always possible Date: Fri, 10 Jun 2016 11:47:08 +0200 Message-Id: <1465552032-28933-1-git-send-email-vkuznets@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 10 Jun 2016 09:47:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org K. Y., I'd like to accompany your netvsc performance improvement work by making in-place consumption of VMBus packets always possible. Currently we forbid it when a packet 'wraps around' the ring so we can't provide a single pointer to it. The idea if this series is dead simple: let's make a single virtual mapping for two copies (actually, two sets of pages which consist the ring buffer) of the ring buffer. With such a mapping we can always provide a pointers for in-place consumption to drivers. Copy path can also benefit from such mappings as we eliminate the need for conditional checking in copy_to/ copy_from functions and use a single memcpy(). Lightly tested with 'netvsc: Use the new in-place consumption APIs in the rx path' patch and with storvsc driver. Vitaly Kuznetsov (4): Drivers: hv: cleanup vmbus_open() for wrap around mappings Drivers: hv: ring_buffer: wrap around mappings for ring buffers Drivers: hv: ring_buffer: use wrap around mappings in hv_copy{from,to}_ringbuffer() Drivers: hv: ring_buffer: count on wrap around mappings in get_next_pkt_raw() drivers/hv/channel.c | 68 ++++++++++++++++++++++++----------------------- drivers/hv/hyperv_vmbus.h | 4 +-- drivers/hv/ring_buffer.c | 61 ++++++++++++++++++++++++------------------ include/linux/hyperv.h | 32 ++++++++-------------- 4 files changed, 83 insertions(+), 82 deletions(-) -- 2.5.5