dmaengine Archive mirror
 help / color / mirror / Atom feed
From: Jerry Snitselaar <jsnitsel@redhat.com>
To: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>,
	Dave Jiang <dave.jiang@intel.com>,
	 dmaengine@vger.kernel.org
Subject: Re: Question about the recent idxd/iaa changes
Date: Mon, 18 Mar 2024 15:34:35 -0700	[thread overview]
Message-ID: <7rrvqwcvuzvygnbow2wvzolvp5bq5dgaytk24filf3uyz47tv7@dvvj4y6tz6xb> (raw)
In-Reply-To: <f653d44ae2a955b021eea2acb7616321d8e0cff7.camel@linux.intel.com>

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@gondor.apana.org.au/
> 
> 

Thank you for the explanation and information Tom.

Regards,
Jerry


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


      reply	other threads:[~2024-03-18 22:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18  8:18 Question about the recent idxd/iaa changes Jerry Snitselaar
2024-03-18 20:35 ` Jerry Snitselaar
2024-03-18 21:57   ` Tom Zanussi
2024-03-18 22:34     ` Jerry Snitselaar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7rrvqwcvuzvygnbow2wvzolvp5bq5dgaytk24filf3uyz47tv7@dvvj4y6tz6xb \
    --to=jsnitsel@redhat.com \
    --cc=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=fenghua.yu@intel.com \
    --cc=tom.zanussi@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).