From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752559AbbKPXTS (ORCPT ); Mon, 16 Nov 2015 18:19:18 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:44898 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbbKPXTR (ORCPT ); Mon, 16 Nov 2015 18:19:17 -0500 Subject: Re: [RFC] User space to kernel space copy optimization To: "Jiang, Dave" , "dmaengine@vger.kernel.org" References: <564A5057.9080203@codeaurora.org> <1447714667.83864.212.camel@intel.com> Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" From: Sinan Kaya Message-ID: <564A6472.5010100@codeaurora.org> Date: Mon, 16 Nov 2015 18:19:14 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1447714667.83864.212.camel@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/16/2015 5:57 PM, Jiang, Dave wrote: >> One of the things I'm interested in is to use a memcpy capable DMA >> > engine HW to optimize user space and kernel space parameter copying. > Have you looked at why NET_DMA was deprecated and using DMA engine to > do kernel->user copy could be a problem? > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/ > ?id=77873803363c > As far as I know, the problem was the TCP/IP stack trying to work on a buffer that was given to the DMA engine for moving. It was causing stale data problems. The goal was to let DMA engine move the data while TCP/IP stack was working on something else. Then, synchronize on a known point. Of course, when above violation happens; things break. Are you expecting a similar problem on user space to kernel space interaction? I think the ownership buffers are pretty much defined, isn't it? -- Sinan Kaya Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project