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: NMilan Broz <mbroz@redhat.com> Tested-by: NYan Li <elliot.li.tech@gmail.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
Showing
想要评论请 注册 或 登录