Date: Wed, 18 Aug 1999 09:42:07 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Luigi Rizzo <luigi@labinfo.iet.unipi.it> Cc: current@FreeBSD.ORG Subject: Re: is pageable memory available in kernel (or will it be ?) Message-ID: <199908181642.JAA47947@apollo.backplane.com> References: <199908181350.PAA12671@labinfo.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
: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, luigi@iet.unipi.it . 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908181642.JAA47947>