Eliminating bounce buffers

From: Larry Woodman (woodman@missioncriticallinux.com)
Date: Fri Jan 28 2000 - 11:29:29 EST


I have a patch for 2.3.40 which eliminates the whole idea of bounce
buffers
and prepare_highmem_swapout()/replace_with_highmem() for big memory
Intel systems. The way it works is rather than copying high memory
pages to and
from low memory pages before scheduling IO, I map highmem pages into
virtual
addresses up in the vmalloc address space (via get_vm_area) and put this
virtual
address in the b_data field of the buffer_head for the duration of the
IO operation.
Once the IO operation completes I unmap the highmem physical address
from
the virtual address so that it can be used by any other IO operation for
a highmem page.
I also changed virt_to_phys() and phys_to_virt() to that it properly
deals with mapped
highmem pages. This all seems to work OK on my 4GB Intel box as long
as the
b_data field of the buffer_head contains a valid address. I notice
there is no more copying
between low and hignmem pages, although I am still testing everything.

This seems to be cleaner than doing IO to lower physical address pages
and copying
to and from highmem pages, or am I missing something here??? There is
still a fair amount of work and cleanup for SMP and non-intel
architectures,
is this worth doing???

Larry Woodman



-
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/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:21 EST