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] [day] [month] [year] [list]
Date:	Sat, 30 Jan 2010 19:21:55 +0100
From:	Stephane Eranian <eranian@...gle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	eranian@...il.com, linux-kernel@...r.kernel.org, mingo@...e.hu,
	paulus@...ba.org, davem@...emloft.net, fweisbec@...il.com,
	perfmon2-devel@...ts.sf.net
Subject: Re: [PATCH] perf_events: improve x86 event scheduling (v6 
	incremental)

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@...radead.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
--
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