From: Sudeep Holla <Sudeep.Holla@arm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Sudeep.Holla@arm.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Rob Herring <robh@kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [PATCH RFC/RFT v2 1/8] drivers: base: support cpu cache information interface to userspace via sysfs
Date: Mon, 10 Feb 2014 18:09:58 +0000 [thread overview]
Message-ID: <52F915F6.9000501@arm.com> (raw)
In-Reply-To: <20140207192925.GB18771@kroah.com>
On 07/02/14 19:29, Greg Kroah-Hartman wrote:
> On Fri, Feb 07, 2014 at 04:49:16PM +0000, Sudeep Holla wrote:
>> From: Sudeep Holla <sudeep.holla@arm.com>
>>
>> This patch adds initial support for providing processor cache information
>> to userspace through sysfs interface. This is based on already existing
>> implementations(x86, ia64, s390 and powerpc) and hence the interface is
>> intended to be fully compatible.
>>
>> The main purpose of this generic support is to avoid further code
>> duplication to support new architectures and also to unify all the existing
>> different implementations.
>>
>> This implementation maintains the hierarchy of cache objects which reflects
>> the system's cache topology. Cache objects are instantiated as needed as
>> CPUs come online. The cache objects are replicated per-cpu even if they are
>> shared. A per-cpu array of cache information maintained is used mainly for
>> sysfs-related book keeping.
>
> I thought I asked that you not use "raw" kobjects for this, instead
> using 'struct device' or just an attribute group?
>
Correct, sorry I should have mentioned here instead of cover letter that it's
not yet done. Since the changes involved other architectures, I posted v2 to get
early feedback and testing. More over it's one place to fix now instead of 4
unlike before.
Just adding cache as a device as you suggested won't suffice here. As we need to
track multiple cache indices for each cpu, devices are needed for each cache
index. I tried using device_create_with_groups which provides all we need in one
api for cache indices but since cpu devices are not associated with any class,
it fails if class is NULL. Any suggestions ?
--->8(something like this)
struct device *dev = get_cpu_device(cpu);
struct device *cache_dev =
device_create(dev->class, dev, 0, NULL, "cache");
/* then for each cache call index device_create_with_groups */
> Using a kobject means that userspace tools that use libudev have no
> chance to see these attributes at all, which is not good, right?
>
Yes I understand that, I am looking at fixing it. Looks like none of the current
implementations cares about uevent notifications :(
Regards,
Sudeep
next prev parent reply other threads:[~2014-02-10 18:09 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 16:49 [PATCH RFC/RFT v2 0/8] drivers: cacheinfo support Sudeep Holla
2014-02-07 16:49 ` [PATCH RFC/RFT v2 1/8] drivers: base: support cpu cache information interface to userspace via sysfs Sudeep Holla
2014-02-07 19:29 ` Greg Kroah-Hartman
2014-02-10 18:09 ` Sudeep Holla [this message]
2014-02-11 0:13 ` Greg Kroah-Hartman
2014-02-13 15:55 ` Sudeep Holla
2014-02-17 18:26 ` Sudeep Holla
2014-02-18 21:53 ` Greg Kroah-Hartman
2014-02-19 16:04 ` Sudeep Holla
2014-02-07 16:49 ` [PATCH RFC/RFT v2 2/8] ia64: move cacheinfo sysfs to generic cacheinfo infrastructure Sudeep Holla
2014-02-07 16:49 ` Sudeep Holla
2014-02-07 16:49 ` [PATCH RFC/RFT v2 3/8] s390: " Sudeep Holla
2014-02-10 9:50 ` Heiko Carstens
2014-02-10 11:34 ` Sudeep Holla
2014-02-10 11:59 ` Heiko Carstens
2014-02-10 11:30 ` Heiko Carstens
2014-02-10 11:36 ` Sudeep Holla
2014-02-17 18:36 ` Sudeep Holla
2014-02-18 9:45 ` Heiko Carstens
2014-02-07 16:49 ` [PATCH RFC/RFT v2 4/8] x86: " Sudeep Holla
2014-02-07 16:49 ` [PATCH RFC/RFT v2 5/8] powerpc: " Sudeep Holla
2014-02-07 16:49 ` Sudeep Holla
2014-02-07 16:49 ` [PATCH RFC/RFT v2 6/8] ARM64: kernel: add support for cpu cache information Sudeep Holla
2014-02-07 16:49 ` Sudeep Holla
2014-02-07 16:49 ` [PATCH RFC/RFT v2 7/8] ARM: " Sudeep Holla
2014-02-07 16:49 ` Sudeep Holla
2014-02-07 16:49 ` [PATCH RFC/RFT v2 8/8] ARM: kernel: add outer cache support for cacheinfo implementation Sudeep Holla
2014-02-07 16:49 ` Sudeep Holla
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=52F915F6.9000501@arm.com \
--to=sudeep.holla@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.