Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757581Ab3CFLUq (ORCPT ); Wed, 6 Mar 2013 06:20:46 -0500 Received: from mail-qa0-f47.google.com ([209.85.216.47]:46864 "EHLO mail-qa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757520Ab3CFLUm (ORCPT ); Wed, 6 Mar 2013 06:20:42 -0500 MIME-Version: 1.0 In-Reply-To: <20130306103120.GA16827@gmail.com> References: <513568A0.6020804@huawei.com> <20130306103120.GA16827@gmail.com> Date: Wed, 6 Mar 2013 12:20:41 +0100 Message-ID: Subject: Re: [PATCH] perf: remove include of cgroup.h from perf_event.h From: Stephane Eranian To: Ingo Molnar Cc: Li Zefan , LKML , Cgroups , Peter Zijlstra , Tejun Heo Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1475 Lines: 37 On Wed, Mar 6, 2013 at 11:31 AM, Ingo Molnar wrote: > > * Stephane Eranian 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/