tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RFC: m_tag pool cache



Hi,

On 2016/02/19 19:01, Thomas Klausner wrote:
> On Fri, Feb 19, 2016 at 06:26:14PM +0900, Kengo NAKAHARA wrote:
>> According to my measurements of using DTrace, there is a certain
>> overhead between kern_malloc() and pool_cache_get(). Here is each
>> function's average turnaround times in my measurement.
>>
>>     m_tag_get            | 124205 [ns]
>>     kern_malloc          | 108007 [ns]
>>     kmem_intr_alloc      |  89636 [ns]
>>     pool_cache_get_paddr |  65942 [ns]
> 
> For people like me who are new to dtrace, can you please post the
> dtrace script you used to measure?

Sure, I used dscript such as the following.
====================
fbt::m_tag_get:entry
{
    self->trace_on = 1;
    self->start[probefunc] = timestamp;
}

fbt::m_tag_get:return
{
    self->trace_on = 0;
    @turnaround[probefunc] = avg(timestamp - self->start[probefunc]);
}


fbt:::entry
/ self->trace_on == 1 /
{
    self->start[probefunc] = timestamp;
}

fbt:::return
/ self->trace_on == 1 /
{
    @turnaround[probefunc] = avg(timestamp - self->start[probefunc]);
}


END
{
    printa(@turnaround);
}
====================

I often use the following web site as a reference.
    http://dtrace.org/guide/preface.html


Thanks,

-- 
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.

Device Engineering Section,
Core Product Development Department,
Product Division,
Technology Unit

Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>


Home | Main Index | Thread Index | Old Index