]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: release aios and pinned buffers on io complete 15398/head
authorSage Weil <sage@redhat.com>
Wed, 31 May 2017 22:44:02 +0000 (18:44 -0400)
committerSage Weil <sage@redhat.com>
Thu, 1 Jun 2017 16:28:44 +0000 (12:28 -0400)
Once we're done with our IO, clear the aio list so that the pinned buffers
are unpinned.  This ensures we release memory quickly, even if the
TransContext sticks around for a while (e.g., in the osr q).

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index 56609a34138dbcf22aff389245d8e66a0e1e263c..249fb05033072779c2ee92f7d6e344d76c1cf44f 100644 (file)
@@ -7575,6 +7575,9 @@ void BlueStore::_txc_finish_io(TransContext *txc)
   std::lock_guard<std::mutex> l(osr->qlock);
   txc->state = TransContext::STATE_IO_DONE;
 
+  // release aio contexts (including pinned buffers).
+  txc->ioc.running_aios.clear();
+
   OpSequencer::q_list_t::iterator p = osr->q.iterator_to(*txc);
   while (p != osr->q.begin()) {
     --p;