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 <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-05-31 18:44:02 -04:00
parent d82af301c8
commit 4e160f20e4

View 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;