linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Haren Myneni <haren@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Dan Streetman <ddstreet@ieee.org>,
	mikey@neuling.org, Herbert Xu <herbert@gondor.apana.org.au>,
	Ram Pai <linuxram@us.ibm.com>,
	npiggin@gmail.com, suka@us.ibm.com,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine
Date: Fri, 01 Sep 2017 21:11:02 -0700	[thread overview]
Message-ID: <59AA2F56.7090307@linux.vnet.ibm.com> (raw)
In-Reply-To: <878thy64an.fsf@concordia.ellerman.id.au>

On 09/01/2017 04:34 AM, Michael Ellerman wrote:
> Haren Myneni <haren@linux.vnet.ibm.com> writes:
>>> On Mon, Aug 28, 2017 at 7:25 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
>>>> Hi Haren,
>>>>
>>>> Some comments inline ...
>>>>
>>>> Haren Myneni <haren@linux.vnet.ibm.com> writes:
>>>>
>>>>> diff --git a/drivers/crypto/nx/nx-842-powernv.c b/drivers/crypto/nx/nx-842-powernv.c
>>>>> index c0dd4c7e17d3..13089a0b9dfa 100644
>>>>> --- a/drivers/crypto/nx/nx-842-powernv.c
>>>>> +++ b/drivers/crypto/nx/nx-842-powernv.c
>>>>> @@ -32,6 +33,9 @@ MODULE_ALIAS_CRYPTO("842-nx");
>>>>>
>>>>>  #define WORKMEM_ALIGN        (CRB_ALIGN)
>>>>>  #define CSB_WAIT_MAX (5000) /* ms */
>>>>> +#define VAS_RETRIES  (10)
>>>>
>>>> Where does that number come from?
>>
>> Sometimes HW returns copy/paste failures. So we should retry the
>> request again. With 10 retries, Test running 12 hours was successful
>> for repeated compression/decompression requests with 1024 threads.
> 
> But why 10. Why not 5, or 100, or 1, or 10,000?

VAS spec says small number of retries. During my 12 hour test with 1024 threads - doing continuous compression/decompression requests, noticed around 6 or 7 retries needed. Hence used 10 retries.  

> 
> Presumably when we have to retry it means the NX is too busy to service the
> request?

One possible case. We can also see failures when receive/send credit are exhausted or reached the cached windows limit.

> 
> Do we have any way to find out how long it might be busy for?
Hard to know the reason of failure. VAS simply returns success or failure without providing the actual reason.

> 
> Should we try an NX on another chip?
Hard to decide whether to fall back on other NX engine since no way to know the actual failure reason on the current NX or no idea whether other NX is free. 

> 
> We should also take into account the size of our request, ie. are we
> asking the NX to compress one page, or 1GB ?

842 compression/decompression request size for NX is always fixed. So divide in to smaller requests for large buffer. Whereas NX gzip engine is different - can be configurable request size. We can look at this optimization when gzip support is added.   
   
> 
> If it's just one page maybe we should fall back to software immediately.

Right now falls back to SW decompression after 10 retries. Whereas user can use SW 842 compression upon failures.

We are planning to look in to performance analysis as part of VAS/NX optimizatiion and make necessary changes.

Thanks
Haren
> 
> cheers
> 

  reply	other threads:[~2017-09-02  4:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-22  5:01 [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine Haren Myneni
2017-07-24 16:46 ` Ram Pai
2017-08-28 23:25 ` Michael Ellerman
2017-08-29 13:32   ` Dan Streetman
2017-08-31  7:44     ` Haren Myneni
2017-08-31 13:40       ` Dan Streetman
2017-08-31 19:03         ` Haren Myneni
2017-09-01 11:34       ` Michael Ellerman
2017-09-02  4:11         ` Haren Myneni [this message]
2017-08-29  6:30 ` Sukadev Bhattiprolu
2017-08-29 13:58 ` Dan Streetman
2017-08-29 21:23   ` Benjamin Herrenschmidt
2017-08-29 21:54     ` Haren Myneni
2017-08-29 21:57       ` Benjamin Herrenschmidt
2017-08-30  1:02         ` Haren Myneni
2017-08-31 13:31       ` Dan Streetman
2017-08-31 19:09         ` Haren Myneni
2017-09-01 11:29         ` Michael Ellerman
2017-09-02  3:27           ` Haren Myneni
2017-09-02 16:14           ` Dan Streetman
2017-09-02  8:40   ` Haren Myneni
2017-09-02 13:42     ` Michael Neuling
2017-09-02 16:17     ` Dan Streetman
2017-09-03  8:32       ` Haren Myneni
2017-09-03 14:12         ` Dan Streetman

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=59AA2F56.7090307@linux.vnet.ibm.com \
    --to=haren@linux.vnet.ibm.com \
    --cc=ddstreet@ieee.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=linuxram@us.ibm.com \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=suka@us.ibm.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 NNTP newsgroup(s).