Re: [PATCH v4] mm/zswap: store <PAGE_SIZE compression failed page as-is
From: Barry Song
Date: Thu Aug 21 2025 - 20:49:44 EST
> > >
> > > 1. remove it,
> > > 2. keep it as is, or
> > > 3. keep it, but account only -EINPROGRESS[1]
> > >
> > > If I'm not missing other options, I'm tempted to the first option (remove it)
> > > since it doesn't change any existing things, and we can revisit later.
> >
> > I am fine with 1) removing it. Maybe add a log once print error on the
> > error code if -EINPROGRESS, just to know such extreme error has been
> > triggered.
> > >
> > > Please let me know if I'm missing other options or if you have other preferences.
> >
> > I just don't want to hide the extreme error case but I am also fine
> > with just removing it. It is your call.
>
> Thank you for your opinion, Chris! Unless others have different opinions, I
> will only remove the counter (option 1), since it is simplest and we can
> consider adding another counter or error logs on top of it.
Yes, that seems the best option—to remove the counter for now.
And I still need Herbert’s help to understand why crypto_wait_req() might return
-EINPROGRESS, given the code below:
static inline int crypto_wait_req(int err, struct crypto_wait *wait)
{
switch (err) {
case -EINPROGRESS:
case -EBUSY:
wait_for_completion(&wait->completion);
reinit_completion(&wait->completion);
err = wait->err;
break;
}
return err;
}
void crypto_req_done(void *data, int err)
{
struct crypto_wait *wait = data;
if (err == -EINPROGRESS)
return;
wait->err = err;
complete(&wait->completion);
}
Is it even possible for crypto_wait_req() to return -EINPROGRESS, since
crypto_req_done() will not call complete(&wait->completion) in that case at
all?
Thanks
Barry