On Sun, Feb 26 2023 at  8:31P -0500,
yangerkun <yanger...@huaweicloud.com> wrote:

> 
> 
> 在 2023/2/26 10:01, Bart Van Assche 写道:
> > On 2/22/23 19:19, yangerkun wrote:
> > > @@ -1924,6 +1926,10 @@ static int dmcrypt_write(void *data)
> > >           BUG_ON(rb_parent(write_tree.rb_node));
> > > +        if (time_is_before_jiffies(start_time + HZ)) {
> > > +            schedule();
> > > +            start_time = jiffies;
> > > +        }
> > 
> > Why schedule() instead of cond_resched()?
> 
> cond_resched may not really schedule, which may trigger the problem too, but
> it seems after 1 second, it may never happend?

I had the same question as Bart when reviewing your homegrown
conditional schedule().  Hopefully you can reproduce this issue?  If
so, please see if simply using cond_resched() fixes the issue.

Thanks,
Mike

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel

Reply via email to