The xlist has means of efficiently removing entries from a list. I
think you'll find those in the path where we start tearing down a PG,
and membership on this list is a bit different from membership in the
ShardedThreadPool. It's all about the particulars of each design, and
I don't have that in my head — you'd need to examine it.
-Greg

On Tue, Nov 10, 2015 at 4:20 PM, 池信泽 <xmdx...@gmail.com> wrote:
> I wonder if we want to keep the PG from going out of scope at an
> inopportune time, why snap_trim_queue and scrub_queue declared as
> xlist<PG*> instead of xlist<PGRef>?
>
> 2015-11-11 2:28 GMT+08:00 Gregory Farnum <gfar...@redhat.com>:
>> On Tue, Nov 10, 2015 at 7:19 AM, 池信泽 <xmdx...@gmail.com> wrote:
>>> hi, all:
>>>
>>>      op_wq is declared as ShardedThreadPool::ShardedWQ < pair <PGRef,
>>> OpRequestRef> > &op_wq. I do not know why we should use PGRef in this?
>>>
>>>      Because the overhead of the smart pointer is not small. Maybe the
>>> raw point PG* is also OK?
>>>
>>>      If op_wq is changed to ShardedThreadPool::ShardedWQ < pair <PG*,
>>> OpRequestRef> > &op_wq (using raw point)
>>>
>>>      the latency for PrioritizedQueue:;enqueue decrease from 3.38us -> 
>>> 1.89us
>>>
>>>      the latency for PrioritizedQueue:;dequeue decrease from 3.44us -> 
>>> 1.65us
>>>
>>>      Is this make sense to you?
>>
>> In general we use PGRefs rather than PG pointers. I think we actually
>> rely on the references here to keep the PG from going out of scope at
>> an inopportune time, but if it halves the cost of queuing actions it
>> might be worth the effort of avoiding that.
>> -Greg
>
>
>
> --
> Regards,
> xinze
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to