:>     call VOP_GETPAGES() on a block of pages instead of just one.  I'm
:>     guessing that is not being done because it's about 100 lines of code
:>     to do it right.  It's easier just to call vn_rdwr() and let the
:>     system do the clustering.
:This argument seems to apply to exec_map_first_pages() too.  It does
:its own blocking to get up to VM_INITIAL_PAGEIN (normally 16) pages
:using only about 50 lines of code, but does this slightly wrong.  It
:doesn't honor the device limit of si_iosize_max, unlike filesystem
:code.  This used to break exec on zip drives (si_iosize_max used to
:be 32K, but VM_INITIAL_PAGEIN pages is 64K bytes on i386's).

    Yes, it definitely applies.  The vm_page_grab() can be replaced
    with a vm_page_lookup() sequence similar to what we find in 
    do_sendfile(), and everything inside the 'if ((ma[0]->valid & ...' 
    can be ripped out and replaced with a single vn_rdwr() call, 
    if (error) test, and then loop back up to the vm_page_lookup().

    There are enough parallels between the sendfile code and
    the exec_map_first_page() code that a significant portion of
    both procedures could be shifted to its own procedure which does
    the read-ahead and returns a single, valid, busied page.

    I am not volunteering to do this, though, I already have a full plate.

                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to