From: Sage Weil Date: Wed, 31 May 2017 22:44:02 +0000 (-0400) Subject: os/bluestore: release aios and pinned buffers on io complete X-Git-Tag: ses5-milestone6~9^2~10^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F15398%2Fhead;p=ceph.git os/bluestore: release aios and pinned buffers on io complete 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 --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 56609a34138d..249fb0503307 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -7575,6 +7575,9 @@ void BlueStore::_txc_finish_io(TransContext *txc) std::lock_guard 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;