DragonFly commits List (threaded) for 2006-12
DragonFly BSD
DragonFly commits List (threaded) for 2006-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/dev/disk/nata ata-all.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Dec 2006 14:18:27 -0800 (PST)

:why do we have to call the ctor and dtor anyways?  why not do if (oc->cto=
:r) oc->ctor(obj); ?  or am i missing something important there?
:
:cheers
:  simon

    I was operating under the assumption that the objcache would normally
    have a ctor / dtor function, so I didn't want to add another conditional
    to that path.  This isn't entirely true any more... or rather, only
    the mbuf subsystem really uses the feature.

    Ok, I AM a bit on the fence here.  I know that implementing M_ZERO adds
    one conditional to the hot path, but the M_ flags (like M_NOWAIT) are
    kinda integral to the allocation subsystem and I don't want to throw
    one away just to save a few nanoseconds.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



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