From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751923AbdARGJB (ORCPT ); Wed, 18 Jan 2017 01:09:01 -0500 Received: from mgwkm03.jp.fujitsu.com ([202.219.69.170]:54579 "EHLO mgwkm03.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751553AbdARGI6 (ORCPT ); Wed, 18 Jan 2017 01:08:58 -0500 X-Greylist: delayed 625 seconds by postgrey-1.27 at vger.kernel.org; Wed, 18 Jan 2017 01:08:57 EST Message-ID: <587F036C.7050200@jp.fujitsu.com> Date: Wed, 18 Jan 2017 14:55:56 +0900 From: Masayoshi Mizuma User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: , CC: Subject: logical cpu number is discontinuity Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On v4.9 and v4.10 kernel, when I booted my box which has two nodes and each nodes have 48 logical cpus (Hyper Threading is enabled), the logical cpu number is discontinuity as follows. node 0: 0-23, 256-279 node 1: 24-47, 280-303 So the following shell script fail to run. --- #!/bin/bash for ((cpu = 0; cpu < `nproc`; cpu++)) do taskset -c $cpu ./do_work done --- I think the logical cpu number should be continuity like as v4.8 and earlier because user applications may expect the number is continuity. I believe this behavior was introduced by the patch series beginning with the following commit. f7c2883 x86/acpi: Enable acpi to register all possible cpus at boot time Do anyone have ideas for fix this behavior...? FYI. v4.8 kernel, the logical cpu number is continuity as follows. node 0: 0-23, 48-71 node 1: 24-47, 72-95 - Masayoshi Mizuma