Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp491682imu; Tue, 20 Nov 2018 02:26:10 -0800 (PST) X-Google-Smtp-Source: AJdET5eUHnwc9kIbcPbqw1p4t7moBGQsqIBzWXMJOrF1OeVpUFKN0dQ3dIzlYFiZCDjjCBnpOtrs X-Received: by 2002:a62:546:: with SMTP id 67mr1528755pff.99.1542709570864; Tue, 20 Nov 2018 02:26:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542709570; cv=none; d=google.com; s=arc-20160816; b=PNKx4UFp35OKfONAH7At3nQa1bsLEPVhngKedlp7XfRd9bomNPrRC4g7bJYTeUyDtj IIXEezGqe4+O5luL10nuzuDP0oUqF3QNXz3syQ6G96YSNiJlhXXZKlt1a06yPPVVmvYQ WlF+Fg8oIQqC+LdmI9dr05hoNR3RpclxsgNkXOY/qZkFQ2T5mFRWSQbROMadBNse8M3D sG2brZWlHpLTImzeegRK7itkTcdYgOYFsPC9XesDZauEcOkzbNV1pyXkxHSJYoC0jpfy 8paDFAOi3SK2TXdJapPm6OAiFitaAx11aYO8ukop6B22k/fzAw96L9ZdYRAuCKTs7L7V 2cfA== 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=ptIePx2T9JemTtpbSOTcx+GJ1lXbq2sO2jrudRr6fws=; b=BY4us9PW+xgxCCjuy6UY3kN+aQ2w672ifePh7oOb3tSndTtE7UtcuqMunSca6CEbBd 8SiJepAwML9AU1ie1/tEEpcBJttAxa6ToeHmqu18q76oGJcEuGquWeBXy00kXDqlLTHu rKgrM31F+SgG5l5sMgaztCP0ovdOd184W9bcrXlgYjMoHGbqNM+Pjc9Yi6dO+OzGGOjE tRpWIXMBB1bWjiZL1chKg25JPnoGikXl88I9ps9CVYygLWvJjM8ZKPmodJsHpMWxWp5A OtS02UZdfbAC8WAiSsMFy3Z7yU44HsE6IzW4kWFoBAgSY4Xu2pO4BqN9S/oD/0kayHTK Bj8g== 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 184si3857446pgj.329.2018.11.20.02.25.55; Tue, 20 Nov 2018 02:26:10 -0800 (PST) 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 S1727298AbeKTUxS (ORCPT + 99 others); Tue, 20 Nov 2018 15:53:18 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:46324 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726250AbeKTUxS (ORCPT ); Tue, 20 Nov 2018 15:53:18 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5E10EEBD; Tue, 20 Nov 2018 02:24:54 -0800 (PST) Received: from [10.1.194.37] (e113632-lin.cambridge.arm.com [10.1.194.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 008A23F575; Tue, 20 Nov 2018 02:24:51 -0800 (PST) Subject: Re: [PATCH v3 05/10] sched/fair: Hoist idle_stamp up from idle_balance To: Steven Sistare , mingo@redhat.com, peterz@infradead.org Cc: subhra.mazumdar@oracle.com, dhaval.giani@oracle.com, daniel.m.jordan@oracle.com, pavel.tatashin@microsoft.com, matt@codeblueprint.co.uk, umgwanakikbuti@gmail.com, riel@redhat.com, jbacik@fb.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, quentin.perret@arm.com, linux-kernel@vger.kernel.org References: <1541767840-93588-1-git-send-email-steven.sistare@oracle.com> <1541767840-93588-6-git-send-email-steven.sistare@oracle.com> <9ad62a6f-0269-a5d9-9757-ba5419f9cc1d@arm.com> <0d8ceaff-6368-2dff-9e2c-e5928ab39bab@oracle.com> From: Valentin Schneider Message-ID: Date: Tue, 20 Nov 2018 10:24:50 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <0d8ceaff-6368-2dff-9e2c-e5928ab39bab@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/11/2018 17:31, Steven Sistare wrote: [...] >>> +#define IF_SMP(statement) statement >>> + >> >> I'm not too hot on those IF_SMP() macros. Since you're not introducing >> any other user for them, what about an inline function for rq->idle_stamp >> setting ? When it's mapped to an empty statement (!CONFIG_SMP) GCC is >> smart enough to remove the rq_clock() that would be passed to it on >> CONFIG_SMP: > > That may be true now, but I worry that rq_clock or its subroutines may gain > side effects in the future that prevent the compiler from removing it. However, > I could push rq_clock into the inline function: > > static inline void rq_idle_stamp_set(rq) { rq->idle_stamp = rq_clock(rq); } > static inline void rq_idle_stamp_clear(rq) { rq->idle_stamp = 0; } > > I like that better, do you? > That works for me, though I can't resist nitpicking on s/rq_idle_stamp_set/rq_idle_stamp_update/ > - Steve