:Hi,
:
:i wonder if some form of pageable memory is available (or will be, or
:can be done with relatively little effort) to pieces of the lower half
:of the kernel. The reason is, the PGM implementation i am working on
:might need to work with really huge windows (megabytes) and on the
:sender side it is not unlikely to have to store a whole file whatever
:its size is.
:
:I suppose sendfile() might have to deal with a similar problem ?
:
: cheers
: luigi
:-----------------------------------+-------------------------------------
: Luigi RIZZO, [EMAIL PROTECTED] . Dip. di Ing. dell'Informazione
The kernel supports the notion of 'managed' pages in KVM, but does not
support the notion of actually taking and processing a page fault
from supervisor mode.
sendfile() pre-reserves a block of KVM and stores the reservation
in sf->kva. Essentially, a number of pte entries are being reserved.
The memory area is initially unmapped.
sendfile() then wires the VM pages associated with the file into this
reserved space using pmap_qenter(). It initiates I/O and waits for
it to complete when necessary when pages are not already in the VM
cache, and unwires them when it is through.
DG did a wonderful job writing sendfile, it is very clean code.
The only issue with doing this sort of thing in general is that you
need to reserve a significant amount of KVM. Fortunately we recently
bumped up the amount of KVM in the system so you should be able to
safely reserve a significant amount without any potential problems -
5 to 20MB depending.
-Matt
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message