lkml.org 
[lkml]   [1996]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRAW I/O
    I am developing a driver for a PCI bus mastering device.  In order
    to allow this device direct access to user memory, the following
    procedure occurs to me:

    1) set "current->swappable" to 0

    2) ensure that the desired pages are in physical memory with
    a per-page call to "(void)get_user(vadr)"

    3) perform a quick, no error checking, virtual-to-physical
    translation:

    padr = pte_page(
    *pte_offset(
    pmd_offset(
    pgd_offset(current->mm, vadr),
    vadr),
    vadr));

    4) provide the physical address(es) to the device

    5) upon completion of the I/O, set "current->swappable" to 1

    While this should work (comments?), preventing the swapping of ALL of
    the current process pages seems overkill, when only a few are required.

    Thus, my question: Is there a way to prevent swapping on a
    page-by-page basis?

    --
    Chuck Goodhart <Charles.E.Goodhart@jpl.nasa.gov>


    \
     
     \ /
      Last update: 2005-03-22 13:37    [W:3.287 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site