mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: eranian@gmail.com, linux-kernel@vger.kernel.org, mingo@elte.hu,
	paulus@samba.org, davem@davemloft.net, fweisbec@gmail.com,
	perfmon2-devel@lists.sf.net
Subject: Re: [PATCH] perf_events: improve x86 event scheduling (v6  incremental)
Date: Sat, 30 Jan 2010 19:21:55 +0100	[thread overview]
Message-ID: <bd4cb8901001301021r6bc2c720i2be574e9a7ccdb1c@mail.gmail.com> (raw)
In-Reply-To: <1264841799.24455.66.camel@laptop>

I will resubmit a patch on Monday. Same thing for AMD NB events.


On Sat, Jan 30, 2010 at 9:56 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Sat, 2010-01-30 at 00:08 +0100, Stephane Eranian wrote:
>> I think there is a problem with this following code:
>>
>> void hw_perf_enable(void)
>>                 for (i = 0; i < cpuc->n_events; i++) {
>>
>>                         event = cpuc->event_list[i];
>>                         hwc = &event->hw;
>>
>>                         if (hwc->idx == -1 || hwc->idx == cpuc->assign[i])
>>                                 continue;
>>
>> Here you are looking for events which are moving. I think the 2nd
>> part of the if is not good enough. It is not because hwc->idx is
>> identical to the assignment, that you can assume the event was
>> already there. It may have been there in the past, then scheduled
>> out and replaced at idx by another event. When it comes back,
>> it gets its spot back, but it needs to be reprogrammed.
>>
>> That is why in v6 incremental, I have added last_cpu, last_tag
>> to have a stronger checks and match_prev_assignment().
>>
>> Somehow it is missing in the series you've committed unless
>> I am missing something.
>
> Right, that went missing because I was assuming that was for the
> optimization of reducing to one loop. And since I didn't see that one
> loop version work I left that part out.
>
> (The risk of doing more than one thing in one patch)
>
> Still, shouldn't be hard to correct, I'll look at doing a patch for this
> on monday, unless you beat me to it :-)
>
>



-- 
Stephane Eranian  | EMEA Software Engineering
Google France | 38 avenue de l'Opéra | 75002 Paris
Tel : +33 (0) 1 42 68 53 00
This email may be confidential or privileged. If you received this
communication by mistake, please
don't forward it to anyone else, please erase all copies and
attachments, and please let me know that
it went to the wrong person. Thanks

  reply	other threads:[~2010-01-30 18:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21 15:39 Stephane Eranian
2010-01-22 20:27 ` Peter Zijlstra
2010-01-25 15:01   ` Peter Zijlstra
2010-01-25 17:12   ` stephane eranian
2010-01-25 17:25     ` Peter Zijlstra
2010-01-25 17:48       ` stephane eranian
2010-01-25 17:59         ` Peter Zijlstra
2010-01-26  9:17           ` Stephane Eranian
2010-01-29 23:08           ` Stephane Eranian
2010-01-30  8:56             ` Peter Zijlstra
2010-01-30 18:21               ` Stephane Eranian [this message]
2010-01-29  9:26 ` [tip:perf/core] perf_events: Add fast-path to the rescheduling code tip-bot for Stephane Eranian

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=bd4cb8901001301021r6bc2c720i2be574e9a7ccdb1c@mail.gmail.com \
    --to=eranian@google.com \
    --cc=davem@davemloft.net \
    --cc=eranian@gmail.com \
    --cc=fweisbec@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®