Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Doug Anderson
Hi, On Thu, Sep 24, 2020 at 11:40 AM Ard Biesheuvel wrote: > > On Thu, 24 Sep 2020 at 20:22, Doug Anderson wrote: > > > > Hi, > > > > On Thu, Sep 24, 2020 at 8:36 AM Ard Biesheuvel wrote: > > > > > > On Thu, 24 Sep 2020 at 17:28, Doug Anderson wrote: > > > > > > > > On Thu, Sep 24, 2020 at 1:3

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Ard Biesheuvel
On Thu, 24 Sep 2020 at 20:22, Doug Anderson wrote: > > Hi, > > On Thu, Sep 24, 2020 at 8:36 AM Ard Biesheuvel wrote: > > > > On Thu, 24 Sep 2020 at 17:28, Doug Anderson wrote: > > > > > > On Thu, Sep 24, 2020 at 1:32 AM Ard Biesheuvel wrote: > > > > > > ... > > > > > > +#define REPS 1

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Doug Anderson
Hi, On Thu, Sep 24, 2020 at 8:36 AM Ard Biesheuvel wrote: > > On Thu, 24 Sep 2020 at 17:28, Doug Anderson wrote: > > > > On Thu, Sep 24, 2020 at 1:32 AM Ard Biesheuvel wrote: > > > > ... > > > > > +#define REPS 100 > > > > > > > > Is this sufficient? I'm not sure what the lower bound

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Ard Biesheuvel
On Thu, 24 Sep 2020 at 17:28, Doug Anderson wrote: > > On Thu, Sep 24, 2020 at 1:32 AM Ard Biesheuvel wrote: > > ... > > > > +#define REPS 100 > > > > > > Is this sufficient? I'm not sure what the lower bound on what's > > > expected of ktime. If I'm doing the math right, on your syst

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Doug Anderson
Hi, On Thu, Sep 24, 2020 at 1:32 AM Ard Biesheuvel wrote: > > On Thu, 24 Sep 2020 at 02:36, Doug Anderson wrote: > > > > Hi, > > > > On Wed, Sep 23, 2020 at 11:22 AM Ard Biesheuvel wrote: > > > > > > Currently, we use the jiffies counter as a time source, by staring at > > > it until a HZ perio

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Ard Biesheuvel
On Thu, 24 Sep 2020 at 02:36, Doug Anderson wrote: > > Hi, > > On Wed, Sep 23, 2020 at 11:22 AM Ard Biesheuvel wrote: > > > > Currently, we use the jiffies counter as a time source, by staring at > > it until a HZ period elapses, and then staring at it again and perform > > as many XOR operations

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-23 Thread Doug Anderson
Hi, On Wed, Sep 23, 2020 at 11:22 AM Ard Biesheuvel wrote: > > Currently, we use the jiffies counter as a time source, by staring at > it until a HZ period elapses, and then staring at it again and perform > as many XOR operations as we can at the same time until another HZ > period elapses, so t

[PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-23 Thread Ard Biesheuvel
Currently, we use the jiffies counter as a time source, by staring at it until a HZ period elapses, and then staring at it again and perform as many XOR operations as we can at the same time until another HZ period elapses, so that we can calculate the throughput. This takes longer than necessary,