[lkml]   [2009]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: splice methods in character device driver
On Sat, Jun 06 2009, Leon Woestenberg wrote:
> Hello Jens,
> in the spirit of splice-and-dice I continue asking questions until I grasp this.
> On Mon, May 11, 2009 at 9:22 PM, Jens Axboe<> wrote:
> > So if your design is allocating the pages in the ->splice_read()
> > handler and initiating IO to these pages, then you need to provide a
> > suitable ->confirm() hook that can wait on this IO to complete if
> > needed.
> When the driver's splice_read() is called, the kernel wants the driver to
> allocate pages and later check that they are filled with data through the
> confirm() hook. Is that correct?


> How can I pass information from the splice_read(), which spawns a hardware
> DMA to the pages in my case, to the confirm() hook which is called at some
> (random) time in the future?

There's a ->private for each pipe_buffer, so you can pass along info on
a per-page granularity.

Jens Axboe

 \ /
  Last update: 2009-06-08 09:07    [W:0.105 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site