Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3922636ybz; Tue, 28 Apr 2020 02:41:35 -0700 (PDT) X-Google-Smtp-Source: APiQypIqY6YBR7wKTVdjJ8zYzBsKIqTJIuKpqwVxRq2R4ZDirgxVMlqWhTAVZQEtM56f8UsjkA67 X-Received: by 2002:a05:6402:1b0b:: with SMTP id by11mr21568574edb.269.1588066895074; Tue, 28 Apr 2020 02:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588066895; cv=none; d=google.com; s=arc-20160816; b=MthGQ+cJDzLm5W4zrMB8beBYYur+TAUUUwPN/LKZCDmvNWlg/TXbZTOTrLyvCOZY/f 8qqViyhtJ+q9FxlkLWHc68+uPJyQjiVjCEN+THiQw04Z50Cd4QNBGQgVYhGX8h4kDtfK qBbMz48Y1TQhC8N89b2h5zttAWCI2+mQCe/nE7iNeJ7btu8pDmnTC476dqgDhBymFLgP 60biQhNgFuyV5YhBTOX/CbSXDqN4q09twUrbn7tSVTiv3EfElNq36yk3EURaDL5xmNhY Bh6pa34DcoFTOG2UZX5477YRvJeUN++HqJtZ/RBmS2zLsJdDP8MmurWSbD/ETz5vA9sK 6RxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=WYpo+Z6op+GKBU4URBMlflx7FfvKvvQdA8PHvyTQKi0=; b=FRGbkpmYn/1Wrf9IyQxFpmQB2CIP88IxpiM5IyzJxdtsAZkFCgRGxZLxk/ZehnglAv uxW2B++BseV4e4q/cb/rDYOJRA0GyQBgeo2c2w1CBBPI3e79RwuqAhSz48Lmcy3vSHrf PnjjGo8Hwf2vHiKVI1GW7w8aVoNDAb2/5m0VmMo/R1JefQRflKphYdA54aAUNMk1WTyF i7AVA6eDSbbvaEUG2cqq9p4BfAzPn87Jjnf6OAb6TDQvYt/hLSNsTV9EBKZuuQXRmW+b Ys2/PNnpI4K0Ps42/tCAyUccSEIGGaTRujHVqIwzm0ntHpYUc0Z4NjAyyDibSDVgv+mM ZKOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t4si1481777ejr.418.2020.04.28.02.41.12; Tue, 28 Apr 2020 02:41:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727831AbgD1JjM (ORCPT + 99 others); Tue, 28 Apr 2020 05:39:12 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39978 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbgD1JjL (ORCPT ); Tue, 28 Apr 2020 05:39:11 -0400 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03S9X6uF145751; Tue, 28 Apr 2020 05:38:50 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 30mguvtb5h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Apr 2020 05:38:50 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 03S9TtSc031783; Tue, 28 Apr 2020 09:38:47 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 30mcu5nt1g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Apr 2020 09:38:47 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 03S9cjfu46727204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Apr 2020 09:38:45 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 62D9342042; Tue, 28 Apr 2020 09:38:45 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C8DB54203F; Tue, 28 Apr 2020 09:38:42 +0000 (GMT) Received: from srikart450.in.ibm.com (unknown [9.85.87.72]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 28 Apr 2020 09:38:42 +0000 (GMT) From: Srikar Dronamraju To: Andrew Morton Cc: Srikar Dronamraju , linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Hocko , Mel Gorman , Vlastimil Babka , "Kirill A. Shutemov" , Christopher Lameter , Michael Ellerman , Linus Torvalds Subject: [PATCH v2 0/3] Offline memoryless cpuless node 0 Date: Tue, 28 Apr 2020 15:08:33 +0530 Message-Id: <20200428093836.27190-1-srikar@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-28_05:2020-04-27,2020-04-28 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 clxscore=1011 mlxlogscore=898 mlxscore=0 suspectscore=2 bulkscore=0 adultscore=0 impostorscore=0 phishscore=0 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004280082 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changelog v1:->v2: - Rebased to v5.7-rc3 - Updated the changelog. Linux kernel configured with CONFIG_NUMA on a system with multiple possible nodes, marks node 0 as online at boot. However in practice, there are systems which have node 0 as memoryless and cpuless. This can cause 1. numa_balancing to be enabled on systems with only one online node. 2. Existence of dummy (cpuless and memoryless) node which can confuse users/scripts looking at output of lscpu / numactl. This patchset wants to correct this anomaly. This should only affect systems that have CONFIG_MEMORYLESS_NODES. Currently there are only 2 architectures ia64 and powerpc that have this config. Note: Patch 3 in this patch series depends on patches 1 and 2. Without patches 1 and 2, patch 3 might crash powerpc. v5.7-rc3 available: 2 nodes (0,2) node 0 cpus: node 0 size: 0 MB node 0 free: 0 MB node 2 cpus: 0 1 2 3 4 5 6 7 node 2 size: 32625 MB node 2 free: 31490 MB node distances: node 0 2 0: 10 20 2: 20 10 proc and sys files ------------------ /sys/devices/system/node/online: 0,2 /proc/sys/kernel/numa_balancing: 1 /sys/devices/system/node/has_cpu: 2 /sys/devices/system/node/has_memory: 2 /sys/devices/system/node/has_normal_memory: 2 /sys/devices/system/node/possible: 0-31 v5.7-rc3 + patches ------------------ available: 1 nodes (2) node 2 cpus: 0 1 2 3 4 5 6 7 node 2 size: 32625 MB node 2 free: 31487 MB node distances: node 2 2: 10 proc and sys files ------------------ /sys/devices/system/node/online: 2 /proc/sys/kernel/numa_balancing: 0 /sys/devices/system/node/has_cpu: 2 /sys/devices/system/node/has_memory: 2 /sys/devices/system/node/has_normal_memory: 2 /sys/devices/system/node/possible: 0-31 Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Cc: Michal Hocko Cc: Mel Gorman Cc: Vlastimil Babka Cc: "Kirill A. Shutemov" Cc: Christopher Lameter Cc: Michael Ellerman Cc: Andrew Morton Cc: Linus Torvalds Srikar Dronamraju (3): powerpc/numa: Set numa_node for all possible cpus powerpc/numa: Prefer node id queried from vphn mm/page_alloc: Keep memoryless cpuless node 0 offline arch/powerpc/mm/numa.c | 32 ++++++++++++++++++++++---------- mm/page_alloc.c | 4 +++- 2 files changed, 25 insertions(+), 11 deletions(-) -- 2.20.1