Re: Question about the recent idxd/iaa changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 18, 2024 at 04:57:52PM -0500, Tom Zanussi wrote:
> Hi Jerry,
> 
> On Mon, 2024-03-18 at 13:35 -0700, Jerry Snitselaar wrote:
> > On Mon, Mar 18, 2024 at 01:18:58AM -0700, Jerry Snitselaar wrote:
> > > With adding the support for loading external drivers like iaa,
> > > autoloading, and default configs, systems with IAA that are booted
> > > in
> > > legacy mode get a number of probe failing messages from the user
> > > driver for the iax wqs before it probes with the iaa_crypto
> > > driver. Should the name match check occur prior to checking if user
> > > pasid is enabled in idxd_user_drv_probe? On a GNR system this will
> > > generate over 100 log messages at boot like the following:
> > > 
> > > [   56.885504] user: probe of wq15.0 failed with error -95
> > > 
> > > Regards,
> > > Jerry
> > > 
> > 
> > Hi Tom,
> > 
> > A couple more iaa questions I had:
> > 
> > - Are you supposed to disable all iax workqueues/devices to
> >   reconfigure a workqueue? It seems perfectly happy to let you
> >   disable, reconfigure, and enable just one. I know for idxd in
> >   general the intent is to be able to disable, configure, and enable
> >   workqueues/devices as needed for different users. I'm wondering if
> >   that is the case for iaa as well since it talks about unloading and
> >   loading iaa_crypto for new configurations.
> > 
> 
> In general the idea is that you set up your workqueues/devices, which
> registers the iaa-crypto algorithm and makes it available as a plugin
> to e.g. zswap. The register happens on the probe of the first wq,
> subsequent wqs are added after that and rebalance the wq table, so
> yeah,  you can also reconfigure wqs in the same way.
> 
> But you can't remove and reconfigure everything and re-register the
> algorithm, see below.
> 
> > 
> > - Is there a reason that iaa_crypto needs to be reloaded beyond the
> >   compression algorithm registration? I tried moving the unregister
> >   into iaa_crypto_remove with a check that the iaa_devices list is
> >   empty, and it seemed to work, but I wasn't sure if there some other
> >   reason for it being in iaa_crypto_cleanup_module instead of
> >   iaa_crypto_remove similar to the register call in iaa_crypto_probe.
> > 
> 
> The requirement to only allow the algorithm to be unregistered on
> module unload came from the crypto maintainer during review [1].
> 
> Specifically, this part:
> 
>   1) Never unregister your crypto algorithms, even after the last
>   piece of hardware has been unplugged.  The algorithms should only
>   be unregistered (if they have been registered through the first
>   successful probe call) in the module unload function.
> 
> hth,
> 
> Tom
> 
> 
> [1] https://lore.kernel.org/lkml/ZC58JggIXgpJ1tpD@xxxxxxxxxxxxxxxxxxx/
> 
> 

Thank you for the explanation and information Tom.

Regards,
Jerry


> 
> 
> 
> > Regards,
> > Jerry
> > 
> 





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux