lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9864072.snIRhummIS@vostro.rjw.lan>
Date:	Mon, 21 Jan 2013 23:35:51 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"Kristen C. Accardi" <kristen.c.accardi@...el.com>,
	Len Brown <lenb@...nel.org>
Subject: Re: [RFC][Update 2][PATCH 2/4] ACPI / PM: Expose reference count values of ACPI power resources

On Monday, January 21, 2013 12:53:57 PM Greg Kroah-Hartman wrote:
> On Mon, Jan 21, 2013 at 02:05:47PM +0100, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > 
> > Since ACPI power resources are going to be used more extensively on
> > new hardware platforms, it becomes necessary for user space (powertop
> > in particular) to observe some properties of those resources for
> > diagnostics purposes.
> > 
> > For this reason, export the reference counts of ACPI power resources
> > to user space by adding a new reference_count attribute to the sysfs
> > directory representing each power resource.  The value read from
> > that attribute represents the number of devices using the power
> > resource at the given time.  If that value is 0, it meas that the
> > power resource is not used and therefore it has been turned off.
> 
> Why does userspace need to know a reference count?  Is it so that if it
> is not 0, it can work to try to lower it to 0?  Or something else?

Yes, this information is needed to say if (1) the power resource is in use
and (2) how many users there are at the moment, so that we can go and look
if it really has to be in use.

Perhaps I can just expose the "in use"/"not in use" information.  I don't
think it will be much less convenient, because we should scan all of the
possible users anyway in case they are coming and going frequently.

So should I do that and rename the attribute to "resource_in_use" (or something
similar)?

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ