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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140924131302.GC2805@worktop.programming.kicks-ass.net>
Date:	Wed, 24 Sep 2014 15:13:02 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	kan.liang@...el.com
Cc:	eranian@...gle.com, linux-kernel@...r.kernel.org, mingo@...hat.com,
	paulus@...ba.org, acme@...nel.org, ak@...ux.intel.com,
	"Yan, Zheng" <zheng.z.yan@...el.com>
Subject: Re: [PATCH V5 02/16] perf, core: introduce pmu context switch
 callback

On Wed, Sep 10, 2014 at 10:08:59AM -0400, kan.liang@...el.com wrote:
> @@ -2446,6 +2499,9 @@ void __perf_event_task_sched_out(struct task_struct *task,
>  {
>  	int ctxn;
>  
> +	if (__get_cpu_var(perf_sched_cb_usages))
> +		perf_pmu_sched_task(task, next, false);
> +
>  	for_each_task_context_nr(ctxn)
>  		perf_event_context_sched_out(task, ctxn, next);
>  
> @@ -2703,6 +2759,9 @@ void __perf_event_task_sched_in(struct task_struct *prev,
>  	/* check for system-wide branch_stack events */
>  	if (atomic_read(&__get_cpu_var(perf_branch_stack_events)))
>  		perf_branch_stack_sched_in(prev, task);
> +
> +	if (__get_cpu_var(perf_sched_cb_usages))
> +		perf_pmu_sched_task(prev, task, true);
>  }
>  

I think the general idea was to get rid of __get_cpu_var() and co,
please consider using __this_cpu_read().
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ