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: <20140603140223.GA13658@twins.programming.kicks-ass.net>
Date:	Tue, 3 Jun 2014 16:02:23 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>, nicolas.pitre@...aro.org,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Mike Galbraith <umgwanakikbuti@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH 0/8] sched,idle: need resched polling rework

On Tue, Jun 03, 2014 at 12:43:47PM +0200, Peter Zijlstra wrote:
> We need rq->curr, rq->idle 'sleeps' with polling set and nr clear, but
> it obviously has no effect setting that if its not actually the current
> task.
> 
> Touching rq->curr needs holding rcu_read_lock() though, to make sure the
> task stays around, still shouldn't be a problem.

> @@ -1581,8 +1604,14 @@ void scheduler_ipi(void)
>  
>  static void ttwu_queue_remote(struct task_struct *p, int cpu)
>  {
> -	if (llist_add(&p->wake_entry, &cpu_rq(cpu)->wake_list))
> -		smp_send_reschedule(cpu);
> +	struct rq *rq = cpu_rq(cpu);
> +
> +	if (llist_add(&p->wake_entry, &rq->wake_list)) {
> +		rcu_read_lock();
> +		if (!set_nr_if_polling(rq->curr))
> +			smp_send_reschedule(cpu);
> +		rcu_read_unlock();
> +	}
>  }

Hrmm, I think that is still broken, see how in schedule() we clear NR
before setting the new ->curr.

So I think I had a loop on rq->curr the last time we talked about this,
but alternatively we could look at clearing NR after setting a new curr.

I think I once looked at why it was done before, of course I can't
actually remember the details :/

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ