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:	Wed, 30 Jul 2014 16:41:01 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Kirill Tkhai <ktkhai@...allels.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Kirill Tkhai <tkhai@...dex.ru>, linux-kernel@...r.kernel.org,
	nicolas.pitre@...aro.org, pjt@...gle.com, rostedt@...dmis.org,
	umgwanakikbuti@...il.com, tim.c.chen@...ux.intel.com,
	mingo@...nel.org
Subject: Re: [PATCH v2 2/5] sched: Teach scheduler to understand
	ONRQ_MIGRATING state

On 07/30, Kirill Tkhai wrote:
>
> В Вт, 29/07/2014 в 18:19 +0200, Oleg Nesterov пишет:
> > On 07/29, Kirill Tkhai wrote:
> > >
> > > How about this? Everything is inside task_rq_lock() now. The patch
> > > became much less.
> >
> > And with this change task_migrating() is not possible under
> > task_rq_lock() or __task_rq_lock(). This means that 1/5 can be simplified
> > too.
>
> It seems to me it won't be useless anyway. In every place we underline
> that a task is exactly queued or dequeued, so it's not necessary to remember
> whether it is migrating or not. This is a cleanup, though it's big.

But, otoh, when you read the code which does "if (task_queued())" it is not
clear whether this code knows that task_migrating() is not possible, or we
should treat the task_migrating() state specially.

But I agree, this is subjective, I leave this to you and Peter.

> > __migrate_swap_task() is probably the notable exception...
> >
> > Off-topic, but it takes 2 ->pi_lock's. This means it can deadlock with
> > try_to_wake_up_local() (if a 3rd process does ttwu() and waits for
> > ->on_cpu == 0). But I guess __migrate_swap_task() should not play with
> > PF_WQ_WORKER threads.
>
> Hmm.. I'm surprised, PF_WQ_WORKER threads may be unbound. But it seems
> we still can't pass them to try_to_wake_up_local.

Why? See wq_worker_sleeping/try_to_wake_up_local in __schedule().

But perhaps I misunderstood you, and probably I was not clear. If
wq_worker_sleeping() returns !NULL then both task should be local, surely
we do not want to migrate them.

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