From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akira Hayakawa Subject: Re: [PATCH 1/1] improve the performance of dm-log-userspace Date: Thu, 21 Nov 2013 19:26:31 +0900 Message-ID: <528DDFD7.6040005@gmail.com> References: Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: dm-devel@redhat.com List-Id: dm-devel.ids Hi, Dongmao I think you are using workqueue the wrong way in two places. 1) WQ_NON_REENTRANT is deprecated. You should remove it. > + if (lc->integrated_flush) { > + lc->dmlog_wq = alloc_workqueue("dmlogd", WQ_NON_REENTRANT | WQ_MEM_RECLAIM, 0); 2) destory_workqueue first calls drain_workqueue which then calls flush_workqueue. You should remove the first line of these. > + flush_workqueue(lc->dmlog_wq); > + destroy_workqueue(lc->dmlog_wq); Akira