mpipe: optimize buffer return mechanism