public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Stephane Eranian <eranian-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH] perf: remove include of cgroup.h from perf_event.h
Date: Wed, 6 Mar 2013 11:31:20 +0100	[thread overview]
Message-ID: <20130306103120.GA16827@gmail.com> (raw)
In-Reply-To: <CABPqkBTTn6E=FS6WiCWopcScHDVa9F6bu5-pw8Ma7TK2aunkvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


* Stephane Eranian <eranian-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> 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.

Thanks,

	Ingo

  parent reply	other threads:[~2013-03-06 10:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05  3:38 [PATCH] perf: remove include of cgroup.h from perf_event.h Li Zefan
     [not found] ` <513568A0.6020804-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-03-05  8:33   ` Stephane Eranian
     [not found]     ` <CABPqkBTTn6E=FS6WiCWopcScHDVa9F6bu5-pw8Ma7TK2aunkvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-05 10:37       ` Li Zefan
     [not found]         ` <5135CAD8.2020409-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-03-05 17:36           ` Tejun Heo
2013-03-06 10:31       ` Ingo Molnar [this message]
2013-03-06 11:20         ` Stephane Eranian

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=20130306103120.GA16827@gmail.com \
    --to=mingo-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=eranian-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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