Received: by 10.213.65.68 with SMTP id h4csp1428262imn; Mon, 26 Mar 2018 07:21:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELtROuFJlAwjXzSt6zVwsHn+GDhnF5k4+SwaOfzfGrLp4Y1phJ7BWbus03crB1DyFxQrURjH X-Received: by 10.99.3.216 with SMTP id 207mr10557601pgd.163.1522074119065; Mon, 26 Mar 2018 07:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522074119; cv=none; d=google.com; s=arc-20160816; b=iftD/+0N9qAVumPuyphbOkDZ+m3DvvE+qmtecd16LvBeMzj10q4W6R8kbGCBNzJ4H7 1Mk8vpH76ffqSIvCbhSCVTyZpmLwsqOgD8VtaTVXawv0cSCszXlU3fBihARZy86g12mJ FETqYTEPUk+jPOIkPNnlnukK2Y6LqkVJHkzEVYc9SE/SePDN5NlL0wt1Zs3I9/SHMTxa MuYg9MIj4IBPOVVXjCIPavjBqnU1i3XrkmyLNcJUGWnJPaB0jHvtvz+0M+Bf7tuxE9A8 PICOkM2C0uly+D7PjzcI0sruUVWcpsiUEV0CGUdBazkgnLeksKiXJpDaoWciFYbU3T0G ytpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=qurunaSYMm7BjgUTu8ftrRcLfB5Mk2ij22IiXRQLMNc=; b=HZztnNXKb0cHRCLhZ32x2HANtOJkjFMFWG/5sgjE/ce+gXCYRZOVV5C1avmXWh1yQ8 kghb2Bc+ffgri8MSA3rtHSBnUgbE0o+KaA/Szu+KnRgVF8H1EcxmUFkc3aA9KZILGjGl irroUe4UNh1dMe+4f47stRHatmTu9vXObCRFxVg8U8PCCW8kNX1iai1buwp7mRzN98Gr YkSVwwpcKN5v5rXd3/oOG5l+FsG7qKNWOHsvSUaVWKibYhGDQLhBLHxlTNE0c1KLuB9Q qWVHqBrmUzC9phvP7GAfCBQkHyiACTa9cfKq1Mt2ZXyZpSeK2ydvSI/UN0/FufuzOUwL ju8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=GIdeM8Nk; dkim=pass header.i=@codeaurora.org header.s=default header.b=lXSjYtMM; 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 y26si226588pfa.411.2018.03.26.07.21.43; Mon, 26 Mar 2018 07:21:59 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=GIdeM8Nk; dkim=pass header.i=@codeaurora.org header.s=default header.b=lXSjYtMM; 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 S1752189AbeCZOUq (ORCPT + 99 others); Mon, 26 Mar 2018 10:20:46 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35158 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983AbeCZOUo (ORCPT ); Mon, 26 Mar 2018 10:20:44 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 47B2A606DB; Mon, 26 Mar 2018 14:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522074044; bh=TI4P9ndyZ+kLAGxbiSGe/fawXvmJ5y/Rf7J2OkmRJEI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GIdeM8NkG+zuTG2KdyoN2ouJsEuwSXs2nOBKtvXDdSDCAqWQPzIpqhOQcH36iTwsx rWScASKD27Eh+NhE2DWl6QRfYdqtR/MR8ygvwRdwHrlXSmdFAYvZ4jLVxVX3T3tY83 u+4bIDQqaTxXjR1vBoiTo+L7QX6QoKp7lO5MGrqI= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 55ED6606DB; Mon, 26 Mar 2018 14:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522074043; bh=TI4P9ndyZ+kLAGxbiSGe/fawXvmJ5y/Rf7J2OkmRJEI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lXSjYtMMNjdXirtV9CTpvj/5JoG6St1g28Db3HFwkagJcO/5Y6STsXlgYKpSKpEiI 47VRgE1unv3KQFnnsYPEJvd/uo7vZ9dTwB1m4rdp2n+c66ibOBbahtUltp5wLGiEHM Cx5/6evh4RiPz9r0A4rJ9UekIRk4eQIbUD3RG/Uc= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 26 Mar 2018 22:20:43 +0800 From: yuankuiz@codeaurora.org To: Tejun Heo Cc: cgroups@vger.kernel.org, lizefan@huawei.com, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, pkondeti@codeaurora.org, cgroups-owner@vger.kernel.org Subject: Re: [PATCH]cgroup: __cpuset_node_allowed return bool In-Reply-To: <20180326141212.GI2149215@devbig577.frc2.facebook.com> References: <0fee75e4a1b12f5fca30e04306a95788@codeaurora.org> <20180326141212.GI2149215@devbig577.frc2.facebook.com> Message-ID: <3540bc7869927f54c409b697c743938a@codeaurora.org> X-Sender: yuankuiz@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tejun, inline. On 2018-03-26 10:12 PM, Tejun Heo wrote: > Hello, John. > > On Sat, Mar 24, 2018 at 01:05:50PM +0800, yuankuiz@codeaurora.org > wrote: >> From 304cec1cc42255fbd9e231a810f4eea20ab74b90 Mon Sep 17 00:00:00 2001 >> From: John Zhao >> Date: Sat, 24 Mar 2018 13:01:32 +0800 >> Subject: [PATCH] cgroup: __cpuset_node_allowed return bool >> >> as a bool, __cpuset_node_allowed(...) return should be bool. > > So, as a minor cleanup patch, this is fine but can you please soften > the commit title / description a bit? It doesn't have to be bool. > int is fine. bool may be marginally more readable but that's about > it, so let's please make the commit match that. [ZJ] In detail, Considering the conversion after it could be compiled into asm such as: // cross compile it was done by "arm-linux-androideabi-gcc" on ubuntu 1) return int type variable in bool function: bool enabled() { int ret = 1; return ret; } /** * ... ... * mov r3, #1 * str r3, [fp, #-8] * ldr r3, [fp, #-8] * cmp r3, #0 * movne r3, #1 * moveq r3, #0 * uxtb r3, r3 * ... ... */ 2) bool enabled() { bool ret = 1; return ret; } /** * ... ... * mov r3, #1 * strb r3, [fp, #-5] * ldrb r3, [fp, #-5] @ zero_extendqisi2 * ... ... */ so the #1) style function can generate significant instructions than the #2). While, this is happened only when "-On" is not used with *-gcc together. Though, it is oftern there, it is best to provide this with decoupling of which option is used for optimization. Situation is only nice to have this change as test_bit() is interpreted in difference way in differece arch, which is "inline int" actually in arm-arch. Which makes the situation is not the like like the general case but needs to be checked and continued in the general include section. So mark this change as nice to have to keep the thing as simple as possible as this is what can be found under /linux/kernel related to this point. > Thanks. Thanks, BR//Zhao