This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: double fault -> PAGE_KERNEL flagged memory


> kmalloc needs contiguous pages of memory. It can be problematic in a system
> where the memory is fragmented and the requested allocation size is big.

Ok.  vmalloc makes sense for big buffers.  It's not all that clear to me
that we can prefault the pages in the right address space ahead of time,
unless we iterate over every mm.  That is, we have to know in what context
we'll be running probe code that needs to use a given buffer, but we can't
necessarily know that before the probe actually hits.  At that point, it
may be unsafe to prefault the vmalloc'd buffer area because the probe point
is in the middle of page table futzing or whatnot.  

In the current Linus kernel, the i386 do_page_fault routine is marked with
__kprobes.  As I understand it, this puts it in a special section and no
kprobe can be inserted inside the function.  If that's the case, I'm a bit
confused as to how this is coming up.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]