Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1173311
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ingo Molnar <mingo@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86, msr: Allow read access to /dev/cpu/X/msr |
| Date | Sat, 27 Jun 2015 10:40:01 +0200 |
| Message-ID | <pFTOx-s8-5@gated-at.bofh.it> (permalink) |
| References | <pFG4W-5Yg-7@gated-at.bofh.it> |
| X-Original-To | Prarit Bhargava <prarit@redhat.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=42fkAGsoCJiV2O2kxAqylJZM273zAqIVj8BpHHiMqNQ=; b=LA1swbKhnE0pwF0hNGY5IZnjiy8+lfWIapWJP525QZt9MvLxkwlnAqP9EW0F4nZmfb iY0ge7OEkdWOjpQuwQ6sKGQajtsvzWAQh41g1/0Qj8B46MAOnOPVg8K/ShYeDc/H36ty CmW4HUQCgn03xnxVNFbWU3usDLYURveGzKkai4uo+Uava+DirMNJDWgiVQ0gPCnF0peL zG37BpdfJn/8Ic4cwo2IpfZRJAnFIKL6rS2U3hwO4p4RszU7Qwq68zvfIt+rxpHHEGx1 Io692gDMkxsC7eFrmoCSe7akdtG2LypxDmmFcsq6KOCQhpYiTwXtbzi3fpB/PtCBkhTH 9Q9A== |
| X-Received | by 10.194.76.237 with SMTP id n13mr9985940wjw.111.1435394038920; Sat, 27 Jun 2015 01:33:58 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 48 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, x86@kernel.org, Len Brown <len.brown@intel.com>, Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> |
| X-Original-Date | Sat, 27 Jun 2015 10:33:55 +0200 |
| X-Original-Message-ID | <20150627083354.GA12834@gmail.com> |
| X-Original-References | <1435341131-3279-1-git-send-email-prarit@redhat.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1173311 |
Show key headers only | View raw
* Prarit Bhargava <prarit@redhat.com> wrote: > Customers write system monitoring software for single systems as well as > clusters. In load-balancing software it is useful to know how "busy" a > core is. Unfortunately the only way to get this data is to run as root, > or use setcap to allow userspace access for particular programs. Both of > these options are clunky at best. > > This patch allows read access to the msr dev files which should be okay. > No damage can be done by reading the MSR values and it allows non-root > users to run system monitoring software. > > The turbostat code specifically checks for CAP_SYS_RAWIO, which it > shouldn't have to and I've removed that code. Additionally I've modified > the turbostat man page to remove documentation about configuring > CAP_SYS_RAW_IO. > > Note: Write access to msr is still restricted with this patch. > > Cc: "H. Peter Anvin" <hpa@zytor.com> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Ingo Molnar <mingo@redhat.com> > Cc: x86@kernel.org > Cc: Len Brown <len.brown@intel.com> > Cc: Prarit Bhargava <prarit@redhat.com> > Cc: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> > Signed-off-by: Prarit Bhargava <prarit@redhat.com> > --- > arch/x86/kernel/msr.c | 11 ++++++++--- > tools/power/x86/turbostat/turbostat.8 | 8 -------- > tools/power/x86/turbostat/turbostat.c | 17 ----------------- > 3 files changed, 8 insertions(+), 28 deletions(-) So what's wrong with exposing them as a simplified PMU driver? That way we only expose the ones we want to - plus tooling can use all the rich perf features that can be used around this. (sampling, counting, call chains, etc.) Thanks, Ingo -- 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/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] x86, msr: Allow read access to /dev/cpu/X/msr Ingo Molnar <mingo@kernel.org> - 2015-06-27 10:40 +0200
csiph-web