qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-1.5 1/2] qom: aggressively optimize qom cast


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH for-1.5 1/2] qom: aggressively optimize qom casting
Date: Mon, 13 May 2013 19:38:32 -0500
User-agent: Notmuch/0.15.2+77~g661dcf8 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu)

Peter Maydell <address@hidden> writes:

> On 13 May 2013 21:31, Anthony Liguori <address@hidden> wrote:
>> This patch adds a small typename cache to ObjectClass.  This allows
>> caching positive casts within each ObjectClass.  Benchmarking a
>> PPC workload provided by Aurelien, this patch eliminates every
>> single g_hash_table_lookup() happening during the benchmark (which
>> was about 2 million per-second).
>
> That's a lot of hashtable lookups...

I suspect it's due to a cast somewhere in a path checking for pending
interrupts or something like that.  That would get called quite often.

>
>> --- a/include/qom/object.h
>> +++ b/include/qom/object.h
>> @@ -344,6 +344,8 @@ typedef void (ObjectUnparent)(Object *obj);
>>   */
>>  typedef void (ObjectFree)(void *obj);
>>
>> +#define OBJECT_CLASS_CAST_CACHE 4
>
> Total nitpick, but shouldn't this be
> OBJECT_CLASS_CAST_CACHE_SIZE ?

Ack, I need to respin anyway so I'll make the updates.

Thanks,

Anthony Liguori



>
> thanks
> -- PMM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]