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: <5329B63F.9090800@arm.com>
Date:	Wed, 19 Mar 2014 15:22:39 +0000
From:	Dietmar Eggemann <dietmar.eggemann@....com>
To:	Vincent Guittot <vincent.guittot@...aro.org>,
	Peter Zijlstra <peterz@...radead.org>
CC:	"mingo@...nel.org" <mingo@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"preeti@...ux.vnet.ibm.com" <preeti@...ux.vnet.ibm.com>,
	"tony.luck@...el.com" <tony.luck@...el.com>,
	"fenghua.yu@...el.com" <fenghua.yu@...el.com>,
	"schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
	"james.hogan@...tec.com" <james.hogan@...tec.com>,
	"cmetcalf@...era.com" <cmetcalf@...era.com>,
	"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
	"linux@....linux.org.uk" <linux@....linux.org.uk>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>
Subject: Re: [PATCH v2 2/7] sched: rework of sched_domain topology definition

On 19/03/14 13:33, Vincent Guittot wrote:
[...]

>>> Is there a way to check that MC and GMC have to have
>>> SD_SHARE_PKG_RESOURCES set so that this can't happen unnoticed?
>>
>> So from the core codes perspective those names mean less than nothing.
>> Its just a string to carry along for us meat-bags. The string isn't even
>> there when !SCHED_DEBUG.
>>
>> So from this codes POV you told it it had a domain without PKGSHARE,
>> that's fine.
>>
>> That said; yeah the thing isn't the prettiest piece of code. But it has
>> the big advantage of being the one place where we convert topology into
>> behaviour.
> 
> We might add a check of the child in sd_init to ensure that the child
> has at least some properties of the current level.
> I mean that if a level has got the SD_SHARE_PKG_RESOURCES flag, its
> child must also have it. The same for SD_SHARE_CPUPOWER and
> SD_ASYM_PACKING.
> 
> so we can add something like the below in sd_init
> 
> child_flags = SD_SHARE_PKG_RESOURCES | SD_SHARE_CPUPOWER | SD_ASYM_PACKING
> flags = sd->flags & child_flags
> if (sd->child)
>    child_flags &= sd->child->flags
> child_flags &= flags
> if (flags != child_flags)
>     pr_info("The topology description looks strange \n");

I tried it with my faulty set-up on TC2 and I get the info message for
the GMC level for all CPU's in sd_init.

I had to pass an 'struct sched_domain *child' pointer into sd_init()
from build_sched_domain() because inside sd_init() sd->child is always NULL.

So one of the requirements of this approach is that a child level like
GMC (which could potentially replace its parent level or otherwise is
destroyed itself) has to specify all flags of its parent level (MC)?

What about SD_NUMA in child_flags? SD_ASYM_PACKING is also a little bit
different than SD_SHARE_PKG_RESOURCES or SD_SHARE_CPUPOWER because it's
not used in the if ... else statement.

But I'm afraid this only works for this specific case of the MC/GMC
layer and is not scalable. If sd->child is a level for which you don't
want to potentially destroy itself or its parent, then you would get
false alarms. IMHO, sd_init() has no information for which pair of
adjacent levels it should apply this check and for which not. Do I miss
something here?

-- Dietmar

> 
> Vincent
> 


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