From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935828AbdIYNzv (ORCPT ); Mon, 25 Sep 2017 09:55:51 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:41226 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934254AbdIYNzu (ORCPT ); Mon, 25 Sep 2017 09:55:50 -0400 Date: Mon, 25 Sep 2017 15:55:42 +0200 From: Peter Zijlstra To: Anna-Maria Gleixner Cc: LKML , Ingo Molnar , Christoph Hellwig , keescook@chromium.org, John Stultz , Thomas Gleixner Subject: Re: [PATCH 07/25] hrtimer: Reduce conditional code (hres_active) Message-ID: <20170925135542.sc4czjbb2j3s5jsj@hirez.programming.kicks-ass.net> References: <20170831105725.809317030@linutronix.de> <20170831105826.120809106@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170831105826.120809106@linutronix.de> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 31, 2017 at 12:23:36PM -0000, Anna-Maria Gleixner wrote: > The hrtimer_cpu_base struct has the CONFIG_HIGH_RES_TIMERS conditional > struct member hres_active. All related functions to this member are > conditional as well. > > There is no functional change, when the hres_active member is unconditional > with all related functions and is set to zero during initialization. This > makes the code easier to read. But you make what was a compile time dead-code-elimination into a runtime load-and-branch. Unless the compiler is overly clever and is able to deduce from the lack of assignments that it must always be 0, is it?