From: Stephane Eranian <eranian@google.com>
To: eranian@gmail.com
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, mingo@elte.hu, paulus@samba.org,
perfmon2-devel@lists.sf.net,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] perf_events: improve Intel event scheduling
Date: Fri, 11 Dec 2009 15:38:52 +0100 [thread overview]
Message-ID: <bd4cb8900912110638h4711587v31cd47a85565b9d7@mail.gmail.com> (raw)
In-Reply-To: <7c86c4470912110300n44650d98ke52ec56cf4d925c1@mail.gmail.com>
On Fri, Dec 11, 2009 at 12:00 PM, stephane eranian
<eranian@googlemail.com> wrote:
>>> --- a/arch/x86/kernel/cpu/perf_event.c
>>> +++ b/arch/x86/kernel/cpu/perf_event.c
>>
>>> @@ -68,6 +69,15 @@ struct debug_store {
>>> u64 pebs_event_reset[MAX_PEBS_EVENTS];
>>> };
>>>
>>> +#define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u64))
>>
>> Do we need this, is it realistic to expect X86_PMC_IDX_MAX to be
>> anything else than 64?
>>
> The issue had to do with i386 mode where long are 32 bits < 64. And in
> particular with the initializer .idxmsk[0] = V. In the future we may exceed
> 32 registers. That means the initializer would have to change. But I guess
> we have quite some ways before this case is reached. So I will revert all
> of this to unsigned long.
>
Well, in fact we have to use u64 because you are already using register
indexes > 32, e.g., for the Intel fixed counters which start at position 32.
Using unsigned long would make the static initializer uglier in this case.
prev parent reply other threads:[~2009-12-11 14:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 15:03 Stephane Eranian
2009-11-18 16:32 ` Peter Zijlstra
2009-12-11 11:00 ` stephane eranian
2009-12-11 11:59 ` stephane eranian
2009-12-21 15:40 ` Peter Zijlstra
2009-12-21 19:00 ` Stephane Eranian
2009-12-21 19:31 ` Peter Zijlstra
2009-12-21 20:59 ` Stephane Eranian
2009-12-21 21:18 ` Peter Zijlstra
2009-12-22 1:09 ` Paul Mackerras
2009-12-22 1:02 ` Paul Mackerras
2009-12-29 14:47 ` Stephane Eranian
2010-01-07 4:13 ` Paul Mackerras
2010-01-07 8:54 ` Peter Zijlstra
2010-01-07 9:00 ` Peter Zijlstra
2010-01-07 9:54 ` Stephane Eranian
2010-01-07 10:01 ` Peter Zijlstra
2009-12-22 0:57 ` Paul Mackerras
2009-12-11 14:38 ` Stephane Eranian [this message]
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=bd4cb8900912110638h4711587v31cd47a85565b9d7@mail.gmail.com \
--to=eranian@google.com \
--cc=davem@davemloft.net \
--cc=eranian@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=perfmon2-devel@lists.sf.net \
--cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®