All of lore.kernel.org
 help / color / mirror / Atom feed
* Issue: Can padata avoid dealing with CPU-related operations?
@ 2023-09-27 13:25 Wang Jinchao
  2023-10-04 14:52 ` Daniel Jordan
  0 siblings, 1 reply; 4+ messages in thread
From: Wang Jinchao @ 2023-09-27 13:25 UTC (permalink / raw)
  To: Steffen Klassert, Daniel Jordan, linux-crypto, linux-kernel; +Cc: stone.xulei

Hello, I have a few questions about the padata code I've been studying recently:

- Why does padata use the WQ_UNBOUND attribute of the workqueue? Because I've noticed a significant maintenance cost related to CPUs. Are there any specific benefits?

- In what scenarios is it necessary to specify a CPU for serial execution, or is ensuring the order sufficient?

In fact, the two questions can be summarized into one: Is it possible to avoid handling CPU-related operations to simplify the code logic?

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issue: Can padata avoid dealing with CPU-related operations?
  2023-09-27 13:25 Issue: Can padata avoid dealing with CPU-related operations? Wang Jinchao
@ 2023-10-04 14:52 ` Daniel Jordan
  2023-10-07  2:56   ` Wang Jinchao
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jordan @ 2023-10-04 14:52 UTC (permalink / raw)
  To: Wang Jinchao; +Cc: Steffen Klassert, linux-crypto, linux-kernel, stone.xulei

Hi,

On Wed, Sep 27, 2023 at 09:25:54PM +0800, Wang Jinchao wrote:
> Hello, I have a few questions about the padata code I've been studying
> recently:
> 
> - Why does padata use the WQ_UNBOUND attribute of the workqueue?

There's background in this series:
    https://lore.kernel.org/all/20190813005224.30779-1-daniel.m.jordan@oracle.com/

> Because I've noticed a significant maintenance cost related to CPUs.
> Are there any specific benefits?

Aside from what Steffen said about serialization, the pcrypt cpumasks
can be set from sysfs to control where parallel and serial jobs run.

> - In what scenarios is it necessary to specify a CPU for serial
> execution, or is ensuring the order sufficient?

I'm not sure that it's necessary.  The way I read it, at least, it seems
pcrypt uses cb_cpu to load balance serialization across all CPUs allowed
in the serial cpumask.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issue: Can padata avoid dealing with CPU-related operations?
  2023-10-04 14:52 ` Daniel Jordan
@ 2023-10-07  2:56   ` Wang Jinchao
  2023-10-25 17:14     ` Daniel Jordan
  0 siblings, 1 reply; 4+ messages in thread
From: Wang Jinchao @ 2023-10-07  2:56 UTC (permalink / raw)
  To: Daniel Jordan; +Cc: Steffen Klassert, linux-crypto, linux-kernel, stone.xulei

On Wed, Oct 04, 2023 at 10:52:57AM -0400, Daniel Jordan wrote:
> Hi,
> 
> On Wed, Sep 27, 2023 at 09:25:54PM +0800, Wang Jinchao wrote:
> > Hello, I have a few questions about the padata code I've been studying
> > recently:
> > 
> > - Why does padata use the WQ_UNBOUND attribute of the workqueue?
> 
> There's background in this series:
>     https://lore.kernel.org/all/20190813005224.30779-1-daniel.m.jordan@oracle.com/
> 
Summarizing, the use of the WQ_UNBOUND attribute is primarily based on performance
considerations. Is this understanding correct?
> > Because I've noticed a significant maintenance cost related to CPUs.
> > Are there any specific benefits?
> 
> Aside from what Steffen said about serialization, the pcrypt cpumasks
> can be set from sysfs to control where parallel and serial jobs run.
> 
> > - In what scenarios is it necessary to specify a CPU for serial
> > execution, or is ensuring the order sufficient?
> 
> I'm not sure that it's necessary.  The way I read it, at least, it seems
> pcrypt uses cb_cpu to load balance serialization across all CPUs allowed
> in the serial cpumask.

I recognize that the key issue isn't the capabilities it can offer, but rather
the underlying necessity for these capabilities. If the need isn't particularly
strong and the cost of implementing this capability is high, should we consider
omitting it?

As previously mentioned in another email, I'm seeking guidance on how to effectively 
evaluate the timing of padata serialization in a network environment. 
Could you provide some insights or pointers on this matter?

Furthermore, I'd like to extend my sincere gratitude for your recent responses 
and would appreciate discussing my future steps with you. 
Thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issue: Can padata avoid dealing with CPU-related operations?
  2023-10-07  2:56   ` Wang Jinchao
@ 2023-10-25 17:14     ` Daniel Jordan
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jordan @ 2023-10-25 17:14 UTC (permalink / raw)
  To: Wang Jinchao; +Cc: Steffen Klassert, linux-crypto, linux-kernel, stone.xulei

On Sat, Oct 07, 2023 at 10:56:31AM +0800, Wang Jinchao wrote:
> On Wed, Oct 04, 2023 at 10:52:57AM -0400, Daniel Jordan wrote:
> > Hi,
> > 
> > On Wed, Sep 27, 2023 at 09:25:54PM +0800, Wang Jinchao wrote:
> > > Hello, I have a few questions about the padata code I've been studying
> > > recently:
> > > 
> > > - Why does padata use the WQ_UNBOUND attribute of the workqueue?
> > 
> > There's background in this series:
> >     https://lore.kernel.org/all/20190813005224.30779-1-daniel.m.jordan@oracle.com/
> > 
> Summarizing, the use of the WQ_UNBOUND attribute is primarily based on performance
> considerations. Is this understanding correct?

Yes, it's entirely based on performance.  In the tests I ran, padata did
a lot better when it was free to run parallel works on any CPU in case
some were busy.

> > > Because I've noticed a significant maintenance cost related to CPUs.
> > > Are there any specific benefits?
> > 
> > Aside from what Steffen said about serialization, the pcrypt cpumasks
> > can be set from sysfs to control where parallel and serial jobs run.
> > 
> > > - In what scenarios is it necessary to specify a CPU for serial
> > > execution, or is ensuring the order sufficient?
> > 
> > I'm not sure that it's necessary.  The way I read it, at least, it seems
> > pcrypt uses cb_cpu to load balance serialization across all CPUs allowed
> > in the serial cpumask.
> 
> I recognize that the key issue isn't the capabilities it can offer, but rather
> the underlying necessity for these capabilities. If the need isn't particularly
> strong and the cost of implementing this capability is high, should we consider
> omitting it?

Well, yeah.  In this case, I'm not sure it's necessary--it looks to me
like it's not--but Steffen might have had a reason for cb_cpu that I'm
not aware of.

> As previously mentioned in another email, I'm seeking guidance on how to effectively 
> evaluate the timing of padata serialization in a network environment. 
> Could you provide some insights or pointers on this matter?

It looks like Steffen has given some hints on testing with IPsec in
another thread.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-25 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27 13:25 Issue: Can padata avoid dealing with CPU-related operations? Wang Jinchao
2023-10-04 14:52 ` Daniel Jordan
2023-10-07  2:56   ` Wang Jinchao
2023-10-25 17:14     ` Daniel Jordan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.