Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp740708yba; Wed, 3 Apr 2019 19:05:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHXUxMG6crqFkdaovB9g6F2zJxASgQyKgzl5rOtxKYCzmS0K1KeKa6sIY+YqFLuzfZ7FxK X-Received: by 2002:a62:604:: with SMTP id 4mr3061899pfg.38.1554343522949; Wed, 03 Apr 2019 19:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554343522; cv=none; d=google.com; s=arc-20160816; b=DF/r1sqpvQZWJRvyirYQoAtgDG0kFHup3l5rtCnG+Uynbh6NUXU7WXItrvCRB8CO9V krSSSJFWqudY7m++sDdGHv9hywzNSTFJOnE+lRvxRoeMLzl3h7P7qeMi7y49MGOh4BdO pOBGJPqADW7wdnjHYWPz+CCbUs2zGTrXZ+UAkkCrg3DWLGO93K/4XdPsKZ5d84GY78Fs ylBFOka1CDzu7OdMbaKFjdBcuz4dilFdCjatXkr9M5ECfW/bPOdDhgKPFr8RF8nyHeKn bYlY+53qIi0VMeOoFOuMhj01fR7k9k8A6lKEpFVaIdeV8osOE0fJRA75LE2L20l0dv2d WxTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=aEl3hDD7v7e7pqU8kUwkE6UaCJSG8ft/h6WuwBEOX/I=; b=edAuyDu1E3EbAkQBWaSYDh6Po/vLmN7r53CQD6LAHvffxoHITZ5dNL+64jdaQa85SR TAc6F8YiYIuwZElnhtD9ewqNRQELDArqdR4SnrxqrVwIhQ7YbXeWNx6lsQtI8/p+RTba xj3zXUlgsaw1ubqjRhOV2mc4Gf6xCqLycNbBxzyGRV+6YE1puEYndVBCnJdB8Xh3kHkT SPVDgMKjGu2WlzWPx6B5RTxoWNrfsCtON4EhllrqXjm/SItPKyEkGPQ8iTzdHxU1qwC3 frRa6g/rhCw0c5Xjau5IEJ6gGFUg4rNMCmF7YQktsSG4Pd9OBph6XrKZpqgUdc4x3Raf mu3w== 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 e5si15032818pls.29.2019.04.03.19.05.08; Wed, 03 Apr 2019 19:05:22 -0700 (PDT) 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 S1726527AbfDDCDG (ORCPT + 99 others); Wed, 3 Apr 2019 22:03:06 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:51196 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726167AbfDDCDG (ORCPT ); Wed, 3 Apr 2019 22:03:06 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [10.3.19.214]) by Forcepoint Email with ESMTP id 2C7E43932CE4BFA18E0B; Thu, 4 Apr 2019 10:03:04 +0800 (CST) Received: from [127.0.0.1] (10.177.223.23) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.408.0; Thu, 4 Apr 2019 10:03:01 +0800 Subject: Re: [PATCH v2 3/5] locking/qspinlock: Introduce CNA into the slow path of qspinlock To: Alex Kogan , , , , , , , , , , , , , CC: , , , References: <20190329152006.110370-1-alex.kogan@oracle.com> <20190329152006.110370-4-alex.kogan@oracle.com> From: Hanjun Guo Message-ID: <5ac2fb0e-744b-3bb5-133a-ac684e061d17@huawei.com> Date: Thu, 4 Apr 2019 10:02:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20190329152006.110370-4-alex.kogan@oracle.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.223.23] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alex, On 2019/3/29 23:20, Alex Kogan wrote: > + > +static __always_inline void cna_init_node(struct mcs_spinlock *node, int cpuid, > + u32 tail) > +{ > + if (decode_numa_node(node->node_and_count) == -1) > + store_numa_node(node, numa_cpu_node(cpuid)); How about using cpu_to_node() here and #include in this file, then the code can be reused for other architectures such as ARM64? Thanks Hanjun