From mboxrd@z Thu Jan 1 00:00:00 1970 From: Milan Broz Subject: Re: cmwq and dm-crypt devices? Date: Wed, 03 Nov 2010 17:22:07 +0100 Message-ID: <4CD18C2F.2070408@redhat.com> References: <4BD099DB.2020108@redhat.com> <20101102220207.GD23680@redhat.com> <4CD12F6E.8040501@kernel.org> <20101103115144.GA18935@basil.fritz.box> <4CD14DF1.90601@redhat.com> <20101103123347.GB18935@basil.fritz.box> <20101103131835.GB5833@agk-dp.fab.redhat.com> <20101103161327.GC18935@basil.fritz.box> <4CD18B24.2010602@kernel.org> 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: <4CD18B24.2010602@kernel.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Tejun Heo Cc: Christophe Saout , Mike Snitzer , Brian Swetland , San Mehat , device-mapper development , Andi Kleen , Andrew Morton , Alasdair G Kergon List-Id: dm-devel.ids On 11/03/2010 05:17 PM, Tejun Heo wrote: >> The old stacking relies on per device threads. Per device threads >> cannot be combined with per CPU threads, because that would lead >> to a thread explosion for large device counts. > > Dunno the context here but creating WQ_NON_REENTRANT | WQ_MEM_RECLAIM > workqueue per device should achieve what you want. It will be per-cpu > while reserving only one worker per workqueue, so there won't be > explosion of threads. Thanks for answer, Yes, that is exactly what I was looking for but was not sure if possible. So switch to normal per device device threads (not singlethreaded as now) combined with the Andi's fixes and it should work for everyone? Milan