Return values for vm.pagefault.return changed with newer kernels

William Cohen wcohen@redhat.com
Thu Feb 12 16:25:00 GMT 2009


Frank Ch. Eigler wrote:
> William Cohen <wcohen@redhat.com> writes:
> 
>> [...]
>> Seems like the saner way to take care of this is to move the this information
>> into the tapsets/memory.stp [...]
>>
>> function vm_fault_minor(long:fault_no)
>> function vm_fault_major(long:fault_no)
>> function vm_fault_oom(long:fault_no)
>> function vm_fault_sigbus(long:fault_no)
>> function vm_fault_error(long:fault_no)
> 
> I guess we need to speculate about future uses and possible future
> changes of this stuff.  It would make about as much sense to have
> something smaller api-wise:
> 
> a single test function
>    function vm_fault_class_p(fault_number:long, class:string)
> and a variable that lists available classes
>    global vm_fault_classes:string []
> 
> ... or else to have code that converts the old style enums to new
> style bit masks in some tapset variable.
> 
> 
> - FChE

I worked out a similar function (vm_fault_contains), but using the integer
VM_FAULT_MAJOR, VM_FAULT_MINOR, etc. into the memory.stp tapset.

vm_fault_contains:long (value:long, test:long)

The patch adds the function to tapset/memory.stp and include changes to
pfaults.stp to exercise the function. The attached patched has been verified to
work with current 2.6.27 kernel on Fedora 10 and older kernel on Red Hat
Enterprise Linux 5.

Any comments on it would be appreciated.

-Will
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pfaults.patch
URL: <http://sourceware.org/pipermail/systemtap/attachments/20090212/f5168cce/attachment.ksh>


More information about the Systemtap mailing list