* cpu_active vs pcrypt & padata
@ 2012-03-16 10:13 Peter Zijlstra
2012-03-16 10:16 ` David Miller
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Peter Zijlstra @ 2012-03-16 10:13 UTC (permalink / raw)
To: Steffen Klassert; +Cc: Ingo Molnar, Thomas Gleixner, linux-kernel
Hi Steffen,
I found cpu_active usage in crypto/pcrypt.c and was wondering what
that's doing there. I would really like to contain that thing to as
narrow a piece of kernel as I possible can (sched/cpuset/hotplug) but it
appears to be spreading.
Also, wth is all this kernel/padata.c stuff? There's next to no useful
comment in there and the only consumer seems to be pcrypt, does that
really need to be in kernel/ ?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cpu_active vs pcrypt & padata
2012-03-16 10:13 cpu_active vs pcrypt & padata Peter Zijlstra
@ 2012-03-16 10:16 ` David Miller
2012-03-16 10:20 ` Peter Zijlstra
2012-03-16 10:44 ` Steffen Klassert
2012-03-16 13:15 ` Jonathan Corbet
2 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2012-03-16 10:16 UTC (permalink / raw)
To: peterz; +Cc: steffen.klassert, mingo, tglx, linux-kernel
From: Peter Zijlstra <peterz@infradead.org>
Date: Fri, 16 Mar 2012 11:13:08 +0100
> Also, wth is all this kernel/padata.c stuff? There's next to no useful
> comment in there and the only consumer seems to be pcrypt, does that
> really need to be in kernel/ ?
There's really nothing specific to crypto in that padata.c file,
anything trying to compute things in parallel with some kind
of converging synchronization points can use that code.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cpu_active vs pcrypt & padata
2012-03-16 10:16 ` David Miller
@ 2012-03-16 10:20 ` Peter Zijlstra
2012-03-16 10:32 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Peter Zijlstra @ 2012-03-16 10:20 UTC (permalink / raw)
To: David Miller; +Cc: steffen.klassert, mingo, tglx, linux-kernel
On Fri, 2012-03-16 at 03:16 -0700, David Miller wrote:
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Fri, 16 Mar 2012 11:13:08 +0100
>
> > Also, wth is all this kernel/padata.c stuff? There's next to no useful
> > comment in there and the only consumer seems to be pcrypt, does that
> > really need to be in kernel/ ?
>
> There's really nothing specific to crypto in that padata.c file,
> anything trying to compute things in parallel with some kind
> of converging synchronization points can use that code.
So why isn't anybody else using that? Don't the block/fs people need
similar things?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cpu_active vs pcrypt & padata
2012-03-16 10:20 ` Peter Zijlstra
@ 2012-03-16 10:32 ` David Miller
2012-03-16 10:42 ` Peter Zijlstra
0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2012-03-16 10:32 UTC (permalink / raw)
To: peterz; +Cc: steffen.klassert, mingo, tglx, linux-kernel
From: Peter Zijlstra <peterz@infradead.org>
Date: Fri, 16 Mar 2012 11:20:15 +0100
> On Fri, 2012-03-16 at 03:16 -0700, David Miller wrote:
>> From: Peter Zijlstra <peterz@infradead.org>
>> Date: Fri, 16 Mar 2012 11:13:08 +0100
>>
>> > Also, wth is all this kernel/padata.c stuff? There's next to no useful
>> > comment in there and the only consumer seems to be pcrypt, does that
>> > really need to be in kernel/ ?
>>
>> There's really nothing specific to crypto in that padata.c file,
>> anything trying to compute things in parallel with some kind
>> of converging synchronization points can use that code.
>
> So why isn't anybody else using that? Don't the block/fs people need
> similar things?
Beats me, but just because there's only one user doesn't mean it belongs
tucked away in that one user's subsystem.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cpu_active vs pcrypt & padata
2012-03-16 10:32 ` David Miller
@ 2012-03-16 10:42 ` Peter Zijlstra
0 siblings, 0 replies; 9+ messages in thread
From: Peter Zijlstra @ 2012-03-16 10:42 UTC (permalink / raw)
To: David Miller; +Cc: steffen.klassert, mingo, tglx, linux-kernel, Chris Mason
On Fri, 2012-03-16 at 03:32 -0700, David Miller wrote:
> Beats me, but just because there's only one user doesn't mean it belongs
> tucked away in that one user's subsystem.
Sure, but I was mostly wondering wth it was, the file doesn't really
explain itself.
Also, most times when introducing generic functionality people try to
collect all interested parties and make something that works for
everybody.
I know for a fact that btrfs does the fan out and regroup thing for
block checksumming etc.. Does Chris even know it exists? If he does why
isn't brtfs using it? If its unsuitable, why wasn't it fixed.
I'm not saying its crap or anything -- I haven't looked at it at all,
beyond my grep for cpu_active -- I'm just wondering, and so far it looks
like there's something weird.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cpu_active vs pcrypt & padata
2012-03-16 10:13 cpu_active vs pcrypt & padata Peter Zijlstra
2012-03-16 10:16 ` David Miller
@ 2012-03-16 10:44 ` Steffen Klassert
2012-03-17 21:00 ` Peter Zijlstra
2012-03-16 13:15 ` Jonathan Corbet
2 siblings, 1 reply; 9+ messages in thread
From: Steffen Klassert @ 2012-03-16 10:44 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Ingo Molnar, Thomas Gleixner, linux-kernel
Hi.
On Fri, Mar 16, 2012 at 11:13:08AM +0100, Peter Zijlstra wrote:
> Hi Steffen,
>
> I found cpu_active usage in crypto/pcrypt.c and was wondering what
> that's doing there. I would really like to contain that thing to as
> narrow a piece of kernel as I possible can (sched/cpuset/hotplug) but it
> appears to be spreading.
pcrypt uses cpu_active to tell padata which cpuset it whishes
to use for parallelization. I could try to push the cpumask
handling down to padata if you want to limit this to the core
kernel.
>
> Also, wth is all this kernel/padata.c stuff? There's next to no useful
> comment in there and the only consumer seems to be pcrypt, does that
> really need to be in kernel/ ?
The padata code is generic and not limited to crypto, you can find
a documentation at Documentation/padata.txt.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cpu_active vs pcrypt & padata
2012-03-16 10:13 cpu_active vs pcrypt & padata Peter Zijlstra
2012-03-16 10:16 ` David Miller
2012-03-16 10:44 ` Steffen Klassert
@ 2012-03-16 13:15 ` Jonathan Corbet
2 siblings, 0 replies; 9+ messages in thread
From: Jonathan Corbet @ 2012-03-16 13:15 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Steffen Klassert, Ingo Molnar, Thomas Gleixner, linux-kernel
On Fri, 16 Mar 2012 11:13:08 +0100
Peter Zijlstra <peterz@infradead.org> wrote:
> Also, wth is all this kernel/padata.c stuff? There's next to no useful
> comment in there and the only consumer seems to be pcrypt, does that
> really need to be in kernel/ ?
FWIW I wrote that stuff up when it went in...
https://lwn.net/Articles/382257/
Might be helpful in case anybody else thinks they might want to use this
facility. Maybe.
jon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cpu_active vs pcrypt & padata
2012-03-16 10:44 ` Steffen Klassert
@ 2012-03-17 21:00 ` Peter Zijlstra
2012-03-20 7:44 ` Steffen Klassert
0 siblings, 1 reply; 9+ messages in thread
From: Peter Zijlstra @ 2012-03-17 21:00 UTC (permalink / raw)
To: Steffen Klassert; +Cc: Ingo Molnar, Thomas Gleixner, linux-kernel
On Fri, 2012-03-16 at 11:44 +0100, Steffen Klassert wrote:
> Hi.
>
> On Fri, Mar 16, 2012 at 11:13:08AM +0100, Peter Zijlstra wrote:
> > Hi Steffen,
> >
> > I found cpu_active usage in crypto/pcrypt.c and was wondering what
> > that's doing there. I would really like to contain that thing to as
> > narrow a piece of kernel as I possible can (sched/cpuset/hotplug) but it
> > appears to be spreading.
>
> pcrypt uses cpu_active to tell padata which cpuset it whishes
> to use for parallelization. I could try to push the cpumask
> handling down to padata if you want to limit this to the core
> kernel.
/me more confused now.. cpu_active isn't in any way shape or form
related to cpusets.
> > Also, wth is all this kernel/padata.c stuff? There's next to no useful
> > comment in there and the only consumer seems to be pcrypt, does that
> > really need to be in kernel/ ?
>
> The padata code is generic and not limited to crypto, you can find
> a documentation at Documentation/padata.txt.
Would be nice to have a short blurb in kernel/padata.c with a reference
to that Documentation stuff for more in-depth bits.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cpu_active vs pcrypt & padata
2012-03-17 21:00 ` Peter Zijlstra
@ 2012-03-20 7:44 ` Steffen Klassert
0 siblings, 0 replies; 9+ messages in thread
From: Steffen Klassert @ 2012-03-20 7:44 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Ingo Molnar, Thomas Gleixner, linux-kernel
On Sat, Mar 17, 2012 at 10:00:34PM +0100, Peter Zijlstra wrote:
> On Fri, 2012-03-16 at 11:44 +0100, Steffen Klassert wrote:
> >
> > pcrypt uses cpu_active to tell padata which cpuset it whishes
> > to use for parallelization. I could try to push the cpumask
> > handling down to padata if you want to limit this to the core
> > kernel.
>
> /me more confused now.. cpu_active isn't in any way shape or form
> related to cpusets.
When looking at this, it seems that cpu_online_mask is the mask
we should use instead of cpu_active_mask. I'll go in for a closer
look at the end of the week.
> >
> > The padata code is generic and not limited to crypto, you can find
> > a documentation at Documentation/padata.txt.
>
> Would be nice to have a short blurb in kernel/padata.c with a reference
> to that Documentation stuff for more in-depth bits.
Indeed, I'll take care for this.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-03-20 7:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16 10:13 cpu_active vs pcrypt & padata Peter Zijlstra
2012-03-16 10:16 ` David Miller
2012-03-16 10:20 ` Peter Zijlstra
2012-03-16 10:32 ` David Miller
2012-03-16 10:42 ` Peter Zijlstra
2012-03-16 10:44 ` Steffen Klassert
2012-03-17 21:00 ` Peter Zijlstra
2012-03-20 7:44 ` Steffen Klassert
2012-03-16 13:15 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox