This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: double fault -> PAGE_KERNEL flagged memory
* Frank Ch. Eigler (fche@redhat.com) wrote:
>
> Mathieu Desnoyers wrote:
> > [...] Make sure that the SystemTAP code is _always_ in contiguous
> > memory non swappable to disk :
>
> Is my impression correct that no ordinary kernel-allocated memory such
> as .ko .text/.data is swappable?
Yes, this is right (module.c:load_module puts all memory allocatable sections
into PAGE_KERNEL_EXEC memory, which is non swappable.
> Remember, this is what systemtap
> creates, plus a few batches of dynamically allocated (k/vmalloc)
> memory during module initialization.
>
The vmalloc'd areas will cause a minor page fault when they are not present in
the page table of the current process. If you do not instrument the page fault
handler, it shouldn't be a problem, but if you do, then you can get a double
fault.
kmalloc'd memory does not have this problem, but does not have the advantages of
virtual memory (especially interesting when allocating big chunks of contiguous
memory in a fragmented pool).
Mathieu
OpenPGP public key: http://krystal.dyndns.org:8080/key/compudj.gpg
Key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68