Subject: Re: [PATCH v3 3/3] powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails

From: "Aneesh Kumar K.V" <[email-masked]>
Date: Thu, 27 Jun 2019 08:26:54 +0530

"Oliver O'Halloran" <[email-masked]> writes:

> As I said in the comments on v1, do we have any actual numbers on how
> long the bind step takes? From memory, you could bind ~32GB in a
> single bind h-call before phyp would hit it's time limit of 250us and
> return a continue token. Assuming that holds we'll be saving a few
> dozen milliseconds at best.
>
>> > +             rc = drc_pmem_bind(p);
>> > +     }
>> > +
>> >       if (rc)
>> >               goto err;
>> >
>>
>> I am also not sure about the module reference count here. Should we
>> increment the module reference count after a bind so that we can track
>> failures in ubind and fail the module unload?
>
> I don't really get what you're concerned about here. The error
> handling path calls drc_pmem_unbind() so if there's a bind error we
> should never leave probe with memory still bound.
>

In the remove callback, if the ubind fail should we allow the module
unload?

-aneesh