Re: Address spaces on a i386 - Getting Confused (fwd)

Ramakrishna K (ramak@wipinfo.soft.net)
Tue, 30 Mar 1999 20:15:51 +0530 (IST)


I am not familiar with Linux code.

But a solution to DMA'ing to user-space will be
a) lock the relevant user range into memory.
b) touch them to fault the pages in.
c) Then trap into the kernel using an ioctl to set up kernel address for this
range. ( I bet there must be some VM calls to acheive that ). What i mean
is that get the pages behind the locked user-address behind the kernel address.
d) Do the DMA to these pages.
e) Release the kernel-mappings.

This helps in zero-copy DMA. Also the user-pages are still swappable, once the DMA is
done and after they are unlocked.

thanks,
Rama.
Forwarded message:
> > David Miller writes:
> > > Date: Tue, 30 Mar 1999 22:36:04 +1000
> > > From: Richard Gooch <rgooch@atnf.csiro.au>
> > >
> > > ??? Pages returned by kmalloc() or get_free_page() aren't
> > > swappable.
> > >
> > > Brain fart, sorry. He will however have to make sure he free's up the
> > > pages when the device is closed because the kernel isn't going to do
> > > it during normal address space destruction.
> >
> > Or perhaps that could be done in the unmap() vm_ops method?
>
> The release handler in 2.1.x/2.2.x is called after the last close & all
> mappings are gone for exactly this reason
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
>

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