Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752430AbbGAReV (ORCPT ); Wed, 1 Jul 2015 13:34:21 -0400 Received: from mail-la0-f47.google.com ([209.85.215.47]:36772 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751316AbbGAReP (ORCPT ); Wed, 1 Jul 2015 13:34:15 -0400 MIME-Version: 1.0 In-Reply-To: <1A7043D5F58CCB44A599DFD55ED4C948468A477B@fmsmsx115.amr.corp.intel.com> References: <1435341131-3279-1-git-send-email-prarit@redhat.com> <20150627083354.GA12834@gmail.com> <20150627083921.GA13074@gmail.com> <1A7043D5F58CCB44A599DFD55ED4C948468A477B@fmsmsx115.amr.corp.intel.com> From: Andy Lutomirski Date: Wed, 1 Jul 2015 10:33:54 -0700 Message-ID: Subject: Re: [PATCH] x86, msr: Allow read access to /dev/cpu/X/msr To: "Brown, Len" Cc: Ingo Molnar , Prarit Bhargava , "linux-kernel@vger.kernel.org" , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , X86 ML , "Chandramouli, Dasaratharaman" , Peter Zijlstra , Borislav Petkov , Andy Lutomirski , Denys Vlasenko , Brian Gerst , Arnaldo Carvalho de Melo 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: 1100 Lines: 27 On Wed, Jul 1, 2015 at 9:38 AM, Brown, Len wrote: > BTW. I've had a discussion w/ LLNL about their needs, > both for security and performance. For security, as concluded > by this thread, a white list is the only way to go. > I'm thinking a bit-vector of allowed MSR offsets... > For performance, they absolutely can not afford a system call > for every single MSR access. I'm surprised. On a sane kernel, a syscall is about 120 cycles. Just rdmsr to an unoptimized MSR is probably fifty cycles, I'd guess. Of course, LLNL is probably using NOHZ_FULL, which is currently very, very slow. Work is afoot to fix that. > Here an ioctl to have the > msr driver perform a vector of accesses in a single system > call seems the way to go. I can prototype both of these > using turbostat as the customer. How about preadv? --Andy -- 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/