[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH 1/3] [DM] dm-crypt: Move post-processing into its own queue



Hi Herbert,

Herbert Xu wrote:
> [DM] dm-crypt: Move post-processing into its own queue
> 
>  
> +	_kcryptd_io_workqueue = create_workqueue("kcryptd-io");

Adding another qlobal per-cpu queue can lead to wasteful creating
of too many kernel threads in system (system with many cores etc.)

I have similar patches in my tree where the queues are created
per crypt device (so every crypt device create two single-threaded
queues).

(And I am thinking about future support of barriers - it can be
really complicated with global workqueue too.)


> @@ -1097,6 +1129,7 @@ static void __exit dm_crypt_exit(void)
>  	if (r < 0)
>  		DMERR("unregister failed %d", r);
>  
> +	destroy_workqueue(_kcryptd_io_workqueue);

also flush_workqueue(_kcryptd_io_workqueue) in crypt_dtr should be there.


Milan
--
mbroz redhat com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]