Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21017253ybl; Sun, 5 Jan 2020 17:39:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwdSXxeAOWGLlEXQ7XIjlLxh98ngX8JZFXHAYMLPnTWtmqBp4Dv1QWSp5KiRgXZUjMkGsw1 X-Received: by 2002:a05:6830:2053:: with SMTP id f19mr2522204otp.193.1578274745093; Sun, 05 Jan 2020 17:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578274745; cv=none; d=google.com; s=arc-20160816; b=0fTt+z9tnvpj1lBpNBWExzeeAq9YzON7nYDgv520+wvn+KyinltVM9l9eE//7EmOyi W7jyhfjz5dY3N0CoM/Ak4DBFyDeFPOkHCAlGqIIn/PWoL40ruvakf8NwfyS5astq3yTj bLpDW4JRxxy11lzwMgGLSSsYofNAqk0lY+sjRofeIqXck6opOpggULFVkm4GxpMrIUAx Hara3J1VeH2ePX7GNXSctBa33FJZRE/4ezhFIOIJ5cEWPdGkHtKKoVvwhC15RHLcSiEB fAQxM8q/j8PePwR0Y0U4ox/IdddGwpwKZ8pMPfDDQwwJhhWV4p756y4cDcVknIM+X0HX qgWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=tC2y+LJ4ZBylsgBVaFtH/KPKvxLaK/+5WpdxgfBaFsg=; b=BJFfbmKzKloHpctzY8WDzGBORJSsB7ggPAU7zi8Co7usvM8zOXEu/czX+mdmjBXZkp cVzIv3l5V932xAV6QRNqF4C49feQtAIbaznOZnouBWlWFcR9ucivfm6+jeUQ74njkz4L AtbAfLZVV6zsbnzLiH5su8ocqoi56GjUl6UEgRo+N9koVs5jlsRqv+1HmeX5qLiNem7a W8AwjfaqGmAXJsFzVScmdSFm7P9iv3xpbqlQWsnG5O7wIY58y29wg6xgl/sC9dpKCGAU PWxTQTp2WK6ssTCFznQP/6Ra9fGDjIDxoo4AQfsTNhP3JHBekw8AQA/O+VPgJ40MEabN suXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i19si22999727oik.272.2020.01.05.17.38.53; Sun, 05 Jan 2020 17:39:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727290AbgAFBiN convert rfc822-to-8bit (ORCPT + 99 others); Sun, 5 Jan 2020 20:38:13 -0500 Received: from szxga08-in.huawei.com ([45.249.212.255]:60154 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727226AbgAFBiN (ORCPT ); Sun, 5 Jan 2020 20:38:13 -0500 Received: from DGGEMM403-HUB.china.huawei.com (unknown [172.30.72.55]) by Forcepoint Email with ESMTP id 345779FD04840D9C8C5D; Mon, 6 Jan 2020 09:38:11 +0800 (CST) Received: from DGGEMM423-HUB.china.huawei.com (10.1.198.40) by DGGEMM403-HUB.china.huawei.com (10.3.20.211) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Jan 2020 09:38:10 +0800 Received: from DGGEMM526-MBX.china.huawei.com ([169.254.8.143]) by dggemm423-hub.china.huawei.com ([10.1.198.40]) with mapi id 14.03.0439.000; Mon, 6 Jan 2020 09:38:00 +0800 From: "Zengtao (B)" To: Sudeep Holla CC: Valentin Schneider , Linuxarm , Greg Kroah-Hartman , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" , Morten Rasmussen Subject: RE: [PATCH] cpu-topology: warn if NUMA configurations conflicts with lower layer Thread-Topic: [PATCH] cpu-topology: warn if NUMA configurations conflicts with lower layer Thread-Index: AQHVuWnsK0zwK8RxTkqe/SNAoYeaUKfT+S+AgALBI6CAAAyngIAAlqWw//+IwoCAAXt3QP//+lWAgASRonA= Date: Mon, 6 Jan 2020 01:37:59 +0000 Message-ID: <678F3D1BB717D949B966B68EAEB446ED340B31E9@dggemm526-mbx.china.huawei.com> References: <1577088979-8545-1-git-send-email-prime.zeng@hisilicon.com> <20191231164051.GA4864@bogus> <678F3D1BB717D949B966B68EAEB446ED340AE1D3@dggemm526-mbx.china.huawei.com> <20200102112955.GC4864@bogus> <678F3D1BB717D949B966B68EAEB446ED340AEB67@dggemm526-mbx.china.huawei.com> <678F3D1BB717D949B966B68EAEB446ED340AFCA0@dggemm526-mbx.china.huawei.com> <20200103114011.GB19390@bogus> In-Reply-To: <20200103114011.GB19390@bogus> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.74.221.187] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Sudeep Holla [mailto:sudeep.holla@arm.com] > Sent: Friday, January 03, 2020 7:40 PM > To: Zengtao (B) > Cc: Valentin Schneider; Linuxarm; Greg Kroah-Hartman; Rafael J. Wysocki; > linux-kernel@vger.kernel.org; Morten Rasmussen; Sudeep Holla > Subject: Re: [PATCH] cpu-topology: warn if NUMA configurations conflicts > with lower layer > > On Fri, Jan 03, 2020 at 04:24:04AM +0000, Zengtao (B) wrote: > > > -----Original Message----- > > > From: Valentin Schneider [mailto:valentin.schneider@arm.com] > > > Sent: Thursday, January 02, 2020 9:22 PM > > > To: Zengtao (B); Sudeep Holla > > > Cc: Linuxarm; Greg Kroah-Hartman; Rafael J. Wysocki; > > > linux-kernel@vger.kernel.org; Morten Rasmussen > > > Subject: Re: [PATCH] cpu-topology: warn if NUMA configurations > conflicts > > > with lower layer > > > > > [...] > > > > > > > Right, and that is checked when you have sched_debug on the cmdline > > > (or write 1 to /sys/kernel/debug/sched_debug & regenerate the sched > > > domains) > > > > > > > No, here I think you don't get my issue, please try to understand my > example > > First:. > > > > ************************************* > > NUMA: 0-2, 3-7 > > core_siblings: 0-3, 4-7 > > ************************************* > > When we are building the sched domain, per the current code: > > (1) For core 3 > > MC sched domain fallbacks to 3~7 > > DIE sched domain is 3~7 > > (2) For core 4: > > MC sched domain is 4~7 > > DIE sched domain is 3~7 > > > > When we are build sched groups for the MC level: > > (1). core3's sched groups chain is built like as: 3->4->5->6->7->3 > > (2). core4's sched groups chain is built like as: 4->5->6->7->4 > > so after (2), > > core3's sched groups is overlapped, and it's not a chain any more. > > In the afterwards usecase of core3's sched groups, deadloop happens. > > > > And it's difficult for the scheduler to find out such errors, > > that is why I think a warning is necessary here. > > > > We can figure out a way to warn if it's absolutely necessary, but I > would like to understand the system topology here. You haven't answered > my query on cache topology. Please give more description on why the > NUMA configuration is like the above example with specific hardware > design details. Is this just a case where user can specify anything > they wish ? > Sorry for the late response, In fact, it's a VM usecase, you can simply understand it as a test case. It's a corner case, but it will hang the kernel, that is why I suggest a warning is needed. I think we need an sanity check or just simply warning, either in the scheduler or arch topology parsing. Regards Zengtao