]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: avoid unncecessary ref-counting in OSD::enqueue_op. 24112/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 15 May 2018 20:14:15 +0000 (22:14 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 14 Sep 2018 19:39:10 +0000 (21:39 +0200)
commit184d0a75f92cbaebbb8e0eab162f48f49bea14b6
tree407d23349c10a794ac77395be7783816eb65519e
parent641ff5e7c716d8d36cd5d0c3e0c74459abd1a911
osd: avoid unncecessary ref-counting in OSD::enqueue_op.

```
-    4,30%     0,32%  msgr-worker-0  ceph-osd  [.] OSD::enqueue_op
   - 3,98% OSD::enqueue_op
      + 2,40% OSD::ShardedOpWQ::_enqueue
      + 0,42% OpRequest::mark_flag_point
        0,37% operator new
        0,36% PerfCounters::tinc
      + 0,21% Mutex::Unlock
```

Annotate:
```
OSD::enqueue_op  /home/perf/src/ceph-rzarzynski3/build/bin/ceph-osd
       │93           if( px != 0 ) intrusive_ptr_add_ref( px );
       │       test   %rbx,%rbx
       │95   _ZN13PGOpQueueableC4E5spg_t():
       │175    explicit PGOpQueueable(spg_t pg) : pgid(pg) {}
  0,70 │       mov    %cl,0x18(%rax)
       │177  _ZN8PGOpItemC4E5spg_tN5boost13intrusive_ptrI9OpRequestEE():
       │204    PGOpItem(spg_t pg, OpRequestRef op) : PGOpQueueable(pg), op(op) {
       │       mov    %rdx,(%rax)
       │206  _ZN5boost13intrusive_ptrI9OpRequestEC4ERKS2_():
       │     ↓ je     166
       │94   _ZNSt13__atomic_baseIiEppEv():
 48,25 │       lock   addl   $0x1,0x30(%rbx)
       │166:   mov    0x158(%rbp),%ecx
       │       mov    0x15c(%rbp),%edx
       │299  _ZN17ShardedThreadPool9ShardedWQI11OpQueueItemE5queueEOS1_():
       │669        tp->set_wq(this);
       │670      }
       │671      ~ShardedWQ() override {}
       │
       │673      void queue(T&& item) {
       │674        _enqueue(std::move(item));
  2,80 │       mov    %r12,%rsi
```

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h
src/osd/OpQueueItem.h