Received: by 10.213.65.68 with SMTP id h4csp3595128imn; Tue, 10 Apr 2018 01:15:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx48/lsybaFguBV2y7c4RiWEGIbtqah+hzYe8WgBDrQwbGMff5O1zHhO7bvYRO+Ij8rsRHLQw X-Received: by 2002:a17:902:ab88:: with SMTP id f8-v6mr42134067plr.34.1523348147849; Tue, 10 Apr 2018 01:15:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523348147; cv=none; d=google.com; s=arc-20160816; b=m5CJRWIgMhRBXF9M4/wALkiEkuP6JDV/WwM9XE1gNgOonHnMaR8FBEJE/8aGnsaQED ObMeZ3r6RYo6E0UbE7UriTXJyvh/D/wlt1PvTwTC7C/HqkKeN3IfPYHsCjcJFmAQnkQK AQB8pbeV7AeQIv5haSuCQeYFsnel/7/7m5YmnEqjz6Byvxci7JaSVaeuc9qBBl8sWWdc wFC+s8kJPf339KmNHjfjEtUhiUTwyaCnAW5cOzWlGANmjeW5LVyA6yA+bS4zF44ipD5G 1RwMwaWN5oVoggrRwAxoJZhNdvJj8/1A9PjcazopxLfJKwA+jqLeuFsmh9Y/QGSOWXQr e4hw== 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=ArEGJyzl+sQNmjk7xs+r9RpGX7rqkbnKMMpWwvreXKg=; b=CtQ5onnXAnPPljsqQXs98nxEFLXMJ8PrHbBHJNq3BnvQcQFFT4QOe6shZktpHV36BL sOAHmoQDBCGWV/yvj7gOmXaOKpfdRT1tq8Q6H+n6yKc2BRTEoJl68y8+/RdqsT4jvwT4 0feyXAem96jQzVDRKBQbboLh3jBv/KUeDfNm7DQQN16NxG3OtxKf08gf2FD0sXSrvyWe WhdfDrKs9zMgysNN/FTR/Wdze2FzZcHttuvy22DJpRpj2D/XOUAP5dcedwalt3u7h9M0 8jIqwA0kmaLwHta2sLWuY6ZbkifYMMptx1Welhap5kJdmI6p4lBqhhQn1ZvMmcnAp7lA muZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=KLmF7GzR; dkim=pass header.i=@codeaurora.org header.s=default header.b=NrjkNKpX; 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 t137si1418726pgb.288.2018.04.10.01.15.10; Tue, 10 Apr 2018 01:15:47 -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=KLmF7GzR; dkim=pass header.i=@codeaurora.org header.s=default header.b=NrjkNKpX; 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 S1752241AbeDJIMD (ORCPT + 99 others); Tue, 10 Apr 2018 04:12:03 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51046 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751983AbeDJIMC (ORCPT ); Tue, 10 Apr 2018 04:12:02 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E95C260AFB; Tue, 10 Apr 2018 08:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523347921; bh=CoKcct1yVbXQthH+u2XLvIX15cuiqa5yRk1yiDKfMQc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KLmF7GzRmDToFOtlp7wWm/JaGMG21i1PpLhnjB4Swe1L8P0pm8arw/jVP2pOrSsT4 JVjiY4PMrODd++cabWUH53Qr0XUUOmtavQI0SJSpCy4GBfcigxM8SX0AsIfj02uWna MYs6QNjf36ZzX12UwldN93OaLjarm7cXagkhHEQk= 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 4670760807; Tue, 10 Apr 2018 08:12:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523347920; bh=CoKcct1yVbXQthH+u2XLvIX15cuiqa5yRk1yiDKfMQc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NrjkNKpXHOiW6uRPss54oNgbsk5TGrkVFP3jAvfaQ8ofYJq4pac/VQPdN1SyfrqBO fnDFPcvrjjKhcsQZBNhJ5si4b/rT+oT/AUSDmm5io7XDRtsskOEshnhEgrL30s13HJ etMhk2jqqB+NwL3fiKtVLxF6Rk0yXHlCZnB1qSKE= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 10 Apr 2018 16:12:00 +0800 From: yuankuiz@codeaurora.org To: Thomas Gleixner Cc: linux-pm@vger.kernel.org, rjw@rjwysocki.net, fweisbec@gmail.com, peterz@infradead.org, aulmck@linux.vnet.ibm.com, mingo@kernel.org, len.brown@intel.com, linux-kernel@vger.kernel.org Subject: Re: Subject: [PATCH] [PATCH] time: tick-sched: use bool for tick_stopped In-Reply-To: References: <891d4f632fbff5052e11f2d0b6fac35d@codeaurora.org> Message-ID: 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 On 2018-04-10 03:55 PM, Thomas Gleixner wrote: > On Tue, 10 Apr 2018, yuankuiz@codeaurora.org wrote: > >> From: John Zhao >> >> Variable tick_stopped returned by tick_nohz_tick_stopped >> can have only true / forse values. Since the return type >> of the tick_nohz_tick_stopped is also bool, variable >> tick_stopped nice to have data type as bool in place of int. > > The data type is not int. [ZJ] Yes. Per newest tip in branch of linux-pm-cpuidle, it is unsigned int with 1 bit in width. There is typo in commit message, "int" at here should be "unsigned int" > It's part of an integer bitfield and occupies > exactly one bit of storage, while bool has an architecture dependend > size > and is at least 1 byte, i.e. 8 bit. So with alignment effects you grew > the > size of the data structure and therefore the cache foot print. [ZJ] So, 1 bit in width is specified as: + bool tick_stopped : 1; This patch is based on the linux-pm-cpuidle branch which has already gathered available space in the structure of tick_sched. > > This is not about 'nice to have' .... > > Thanks, > > tglx