Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp5126996ima; Tue, 5 Feb 2019 06:49:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IY8vg2cCkEm7zOxSajzj69AyjSkB5Hge801gHEBaA7oMR9wqwkaP/FUbbuCbY+V8WxzGzqL X-Received: by 2002:a17:902:6bc7:: with SMTP id m7mr5597302plt.106.1549378180156; Tue, 05 Feb 2019 06:49:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549378180; cv=none; d=google.com; s=arc-20160816; b=hyz7SjoVUIeBD1zTto45cFvvwm7XB92SBR/Ms3NzwyunRHZ+9kaVR+mQOfSJS3tFPl fflJ9Foz8MjpxRQ2a4DwlgLOsM54Eyw4b4vq+CMOiP//kqEngfXsHrRulbFGoLr8FRJa 0fkx2DIe+zo1UQcqpN1dtfMZMM9MX/gTab3Zuhn2maSxEdO4FkBKMZoNpM8safLsPrUU sRmCiCMdXY/+SvMO1Um505koKJWhkVgB6DWv1vOPhk0bLutSnml9AAX2LLF0M0ebJ0eG gICM5o7Qbq2L5e9CKUKAJFR4sgJgZij0guhPbrGq0QQx/J+rdXoqDTPtsLkLg+q+2axY qq6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bLH6uwFWigGwvkOESLoN+U+TL9h+AfCEQtPwrO6HcQE=; b=oF0DvVqf0//81O3akm46LCWbqJikPUdpRWCpjxDyXz+XbRIHKSch2NqAe3rNUfCJCQ lBKuW4/S7DM9wBSdIEULbwsPvbgW++DVhl3Hn+q1zTsPBhqfOIvUDg12/0HcC9rEVG3B VikG/XF9PsmgxeB6LPWkJqfRmSgvymX1UZ9scq/U/PGECBVK5xi8o8D4Prf0ozwhELI3 W/fG6zMsPYgUlY4CuB5aO9F5L/XEG0+rrccQCql2Tzjud0g+LwR4e1C3NH5mxbjrEkDe 6GVHbErEk3Xi7gp9mDXGXZm3z+RLPRxTCKRmXqr3QNx9jImSrYki1OEwKIuVQUTJr6XV jXaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si3477910pfj.45.2019.02.05.06.49.24; Tue, 05 Feb 2019 06:49:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728900AbfBEOsu (ORCPT + 99 others); Tue, 5 Feb 2019 09:48:50 -0500 Received: from mga12.intel.com ([192.55.52.136]:34779 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728299AbfBEOst (ORCPT ); Tue, 5 Feb 2019 09:48:49 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Feb 2019 06:48:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,564,1539673200"; d="scan'208";a="115431231" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga008.jf.intel.com with ESMTP; 05 Feb 2019 06:48:48 -0800 Date: Tue, 5 Feb 2019 07:48:15 -0700 From: Keith Busch To: "Rafael J. Wysocki" Cc: Linux Kernel Mailing List , ACPI Devel Maling List , Linux Memory Management List , Greg Kroah-Hartman , "Hansen, Dave" , "Williams, Dan J" Subject: Re: [PATCHv5 04/10] node: Link memory nodes to their compute nodes Message-ID: <20190205144815.GA28023@localhost.localdomain> References: <20190124230724.10022-1-keith.busch@intel.com> <20190124230724.10022-5-keith.busch@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 05, 2019 at 04:33:27AM -0800, Rafael J. Wysocki wrote: > On Fri, Jan 25, 2019 at 12:08 AM Keith Busch wrote: > > +/** > > + * struct node_access_nodes - Access class device to hold user visible > > + * relationships to other nodes. > > + * @dev: Device for this memory access class > > + * @list_node: List element in the node's access list > > + * @access: The access class rank > > + */ > > +struct node_access_nodes { > > + struct device dev; > > I'm not sure if the entire struct device is needed here. > > It looks like what you need is the kobject part of it only and you can > use a kobject directly here: > > struct kobject kobj; > > Then, you can register that under the node's kobject using > kobject_init_and_add() and you can create attr groups under a kobject > using sysfs_create_groups(), which is exactly what device_add_groups() > does. > > That would allow you to avoid allocating extra memory to hold the > entire device structure and the extra empty "power" subdirectory added > by device registration would not be there. This is conflicting with Greg's feedback from the first version of this series: https://lore.kernel.org/lkml/20181126190619.GA32595@kroah.com/ Do you still recommend using kobject?