]> git.baikalelectronics.ru Git - kernel.git/commit
dm crypt: use cond_resched
authorMilan Broz <mbroz@redhat.com>
Wed, 2 Jul 2008 08:34:28 +0000 (09:34 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Wed, 2 Jul 2008 08:34:28 +0000 (09:34 +0100)
commitc94eb13467854f6a9c7b51a3de06da998d4dd382
treec200c19aca2faf22ad5c8636a3a783f8e26ef289
parent77d1964779f2fcaee94eff4389213866c348df1c
dm crypt: use cond_resched

Add cond_resched() to prevent monopolising CPU when processing large bios.

dm-crypt processes encryption of bios in sector units.  If the bio request
is big it can spend a long time in the encryption call.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Tested-by: Yan Li <elliot.li.tech@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-crypt.c