lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200908070929.53873.laurent.pinchart@ideasonboard.com>
Date:	Fri, 7 Aug 2009 09:29:53 +0200
From:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:	"David Xiao" <dxiao@...adcom.com>
Cc:	"Ben Dooks" <ben-linux@...ff.org>,
	"Hugh Dickins" <hugh.dickins@...cali.co.uk>,
	"Robin Holt" <holt@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"v4l2_linux" <linux-media@...r.kernel.org>,
	"linux-arm-kernel@...ts.arm.linux.org.uk" 
	<linux-arm-kernel@...ts.arm.linux.org.uk>
Subject: Re: How to efficiently handle DMA and cache on ARMv7 ? (was "Is get_user_pages() enough to prevent pages from being swapped out ?")

On Thursday 06 August 2009 20:46:14 David Xiao wrote:

[snip]

> Another approach is working from a different direction: the kernel
> allocates the non-cached buffer and then mmap() into user space. I have
> done that in similar situation to try to achieve "zero-copy".

That's what most drivers do. While it's probably the easiest solution in many 
cases, it will sometimes introduce additional memcpy() operations that I'd 
like to avoid.

Think about the simple following use case. An application wants to display 
video it acquires from the device to the screen using Xv. The video buffer is 
allocated by Xv. Using the v4l2 user pointer streaming method, the device can 
DMA directly to the Xv buffer. Using driver-allocated buffers, a memcpy() is 
required between the v4l2 buffer and the Xv buffer.

Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ