From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance Date: Thu, 9 Jan 2014 08:48:07 +0200 Message-ID: <20140109064807.GC19559@redhat.com> References: <1389072355-20666-1-git-send-email-mwdalton@google.com> <1389072355-20666-3-git-send-email-mwdalton@google.com> <20140109014255.GA19321@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Michael Dalton Cc: netdev@vger.kernel.org, lf-virt , Eric Dumazet , "David S. Miller" List-Id: virtualization@lists.linuxfoundation.org On Wed, Jan 08, 2014 at 07:41:58PM -0800, Michael Dalton wrote: > Sorry, forgot to mention - if we want to explore combining the buffer > address and truesize into a single void *, we could also exploit the > fact that our size ranges from aligned GOOD_PACKET_LEN to PAGE_SIZE, and > potentially encode fewer values for truesize (and require a smaller > alignment than 256). The prior e-mails discussion of 256 byte alignment > with 256 values is just one potential design point. > > Best, > > Mike Good point. I think we should keep the option to make buffers bigger than 4K, so I think we should start with 256 alignment, then see if there are workloads that are improved by smaller alignment. Can you add wrapper inline functions to pack/unpack size and buffer pointer to/from void *? This way it will be easy to experiment with different alignments.