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]

[Bug runtime/15805] maps should not be allocated with k*alloc


http://sourceware.org/bugzilla/show_bug.cgi?id=15805

David Smith <dsmith at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsmith at redhat dot com

--- Comment #3 from David Smith <dsmith at redhat dot com> ---
Created attachment 7135
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7135&action=edit
potential patch

Here's a patch that changes map allocation to use vmalloc instead of kmalloc.
Tested on rhel5 (ia64, x86_64) and rawhide (x86_64).

Note a couple of things:

1) There isn't a exported rawhide kernel vmalloc variant that supports
allocating on a particular node and lets you set flags. I chose to use the
variant that lets you allocate on a particular node.

2) On rhel5 ia64 (2.6.18-348.6.1.el5debug), I'm seeing some bad/odd behavior.
With the patch applied, you can use -DUSE_KMALLOC to use kmalloc for allocation
instead.

====
# time stap -DUSE_KMALLOC --disable-cache
../src/testsuite/systemtap.maps/ix_clear.stp
foo[1] = 1 1
ERROR: empty aggregate near operator '@min' at
../src/testsuite/systemtap.maps/ix_clear.stp:14:45
WARNING: Number of errors: 1, skipped probes: 0
WARNING: /usr/local/bin/staprun exited with status: 1
Pass 5: run failed.  [man error::pass5]

real    0m20.055s
user    0m16.192s
sys    0m2.734s
====

So, using kmalloc(), it takes around 20 seconds to run that test (which is
supposed to fail).

Using vmalloc():

====
time stap --disable-cache ../src/testsuite/systemtap.maps/ix_clear.stp
foo[1] = 1 1
ERROR: empty aggregate near operator '@min' at
../src/testsuite/systemtap.maps/ix_clear.stp:14:45
WARNING: Number of errors: 1, skipped probes: 0
WARNING: /usr/local/bin/staprun exited with status: 1
Pass 5: run failed.  [man error::pass5]

real    11m34.415s
user    0m17.374s
sys    11m15.986s
====

With vmalloc, it takes over 11 minutes.

-- 
You are receiving this mail because:
You are the assignee for the bug.


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