lkml.org 
[lkml]   [2013]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf: remove include of cgroup.h from perf_event.h
From
On Wed, Mar 6, 2013 at 11:31 AM, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Stephane Eranian <eranian@google.com> wrote:
>
>> > - * This is a per-cpu dynamically allocated data structure.
>> > - */
>> > -struct perf_cgroup_info {
>> > - u64 time;
>> > - u64 timestamp;
>> > -};
>> > -
>> > -struct perf_cgroup {
>> > - struct cgroup_subsys_state css;
>> > - struct perf_cgroup_info *info; /* timing info, one per cpu */
>> > -};
>> > -#endif
>> > -
>> > +struct perf_cgroup;
>>
>> The problem is that you have struct perf_cgroup in the struct perf_event
>> structure. Today, this field is not referenced outside of kernel/events/core.c But
>> it is available outside this file. If someday the field is reference, your changes
>> will have to do reverted. So I am wondering what is the point of the change right
>> now?
>
> It's standard practice to not define the type for task_struct or other kernel
> subsystems.
>
> For example slab caches can be created via kmem_cache_create() anywhere in the tree,
> but the internal structure is only known to the SLAB subsystem.
>
I am fine with the change.


\
 
 \ /
  Last update: 2013-03-06 13:01    [W:0.156 / U:0.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site