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]
Date:	Thu, 31 Mar 2011 16:10:40 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Jiri Olsa <jolsa@...hat.com>, Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH,RFC] perf: panic due to inclied cpu context task_ctx
	value

On 03/31, Peter Zijlstra wrote:
>
> On Thu, 2011-03-31 at 15:28 +0200, Oleg Nesterov wrote:
> >
> > OK, synchronize_sched() can't work. How about
> >
> > 	static int force_perf_event_task_sched_out(void *unused)
> > 	{
> > 		struct task_struct *curr = current;
> >
> > 		__perf_event_task_sched_out(curr, task_rq(curr)->idle);
>
> I'd call task_ctx_sched_out() there,

Perhaps... but then we miss perf_cgroup_sched_out(). Anyway, I think
it is better to not optimize this code. If __perf_event_task_sched_in()
was called, it should be paired with __perf_event_task_sched_out().

> we can't actually use struct rq
> outside of sched.c

Yes, this should live in sched.c

> and we know we'll not swap contexts with the idle
> thread.

Yes, that is why it uses next = rq->idle.

> Anyway, I _think_ we can do better..

Yes, agreed. As I said, I don't like this too much.

Oleg.

--
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