Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1006774ybt; Fri, 19 Jun 2020 21:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4K5SiYvymEqNG8045dDRdPrXSFgvq6s6cdIQQnO2RSahPvhucYMXfXpkBYZUCSp9aKXBm X-Received: by 2002:a17:906:b7c8:: with SMTP id fy8mr6407701ejb.85.1592627017266; Fri, 19 Jun 2020 21:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592627017; cv=none; d=google.com; s=arc-20160816; b=CX37vIqEioX64Zm+q/aisrRz6DqGumWL5yGpYZxYsvGmBoeP87lL2Dbt1ckXSSyv4U sYznYzdG2WBhNfnI7Mo5Tau2kHRclHRmJjo59I7ICV1z8DMEyZzQ+dV9lt+Fro09WMaj IooHH9d4njALhnl/QgTBUH8u7C0Yu5FWmySm1SrZqLKNbNEI+Cdxykt17782nW+6Dy0k E/ruNUd0yQ8nEqkACVwdNE4z4sfQJqfWcDpI2HjPYVXu2F9Cbrw8fFzKsC/oLUiWGN1S ge+QXLfblbZR+iANyz9kC18JK2d/yl3WCGUfF9f3ulew4/CZfSzkPyNVLQsOvIhpo3NE Dn5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=RmbBPWj+7r7cqSwWtOeyaSwx07WIPg3ahEci8gVOaTA=; b=yIpb8pm++hywDElsrSwe3mmy6vTK68AmYS94ALtls2W1DpAYqJ73zDyRuK5kStIkVE IsvLVOk4ZiiqWXPbB2y7FGhFvoZHHhD6KPA+0bkJ07l8RLB+OcBA8K4KCXmVTtnsTxeN 2AlL8+R0c+tleIKpLgdhxvvfThJwQEmerprWnHMjd2UpQOVe+oD3k0sHL2lJb1c/yo68 TZn+4ILiOstYdVwqG13W/Wke6KEKJQ1iBIyQ/4bYuYaMZQ8Ai5/TCCqXRLfwxYY5U40F n5i0CzdFsRlULlj7uG4jgOE7IN9VjtfoqkbxQFy7W5x3fC1wY0R0dtRrYrJoDQTcros0 JnTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nr0oj9+i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch5si4889139edb.567.2020.06.19.21.23.15; Fri, 19 Jun 2020 21:23:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nr0oj9+i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732418AbgFSSNR (ORCPT + 99 others); Fri, 19 Jun 2020 14:13:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732041AbgFSSNQ (ORCPT ); Fri, 19 Jun 2020 14:13:16 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30482C06174E for ; Fri, 19 Jun 2020 11:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=RmbBPWj+7r7cqSwWtOeyaSwx07WIPg3ahEci8gVOaTA=; b=nr0oj9+i1nU+XggYl68VFl4O20 ycUQUbuGYzrReMInedxQ7HLFwcZYS62ox4SNXYmTmfEytI7VL1Kt/gsT3/FcuW/xZqY9KM03Z1JIi uYw2CLEHjQpEXulaXvMAoSP38iBlwwJz2mWpVYXsyTd5oUJDdmv/YK8+6Zp6FUrYaENNZMsICdAC9 sDoUjoIwzmAu668dtmk03w0uA/zA6fXSuE+GVJYtcRNXUgPZOhCJX1AjUMxAX5Elo3FdNvkG0S7mO higWTDwSFZawGMFn+cWyj/Fju8qMPIjSFhrZ2L07vbmzEjpR5IHkS7hi6diEqTjYJ590/MZqx3HDM /e9liLgA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmLVh-000625-Bj; Fri, 19 Jun 2020 18:13:05 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 92EE230018A; Fri, 19 Jun 2020 20:13:03 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 836BE2C27FBC0; Fri, 19 Jun 2020 20:13:03 +0200 (CEST) Date: Fri, 19 Jun 2020 20:13:03 +0200 From: Peter Zijlstra To: Qais Yousef Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Patrick Bellasi , Chris Redpath , Lukasz Luba , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] sched/uclamp: Fix initialization of strut uclamp_rq Message-ID: <20200619181303.GD576888@hirez.programming.kicks-ass.net> References: <20200618195525.7889-1-qais.yousef@arm.com> <20200618195525.7889-2-qais.yousef@arm.com> <20200619173055.GA576888@hirez.programming.kicks-ass.net> <20200619173944.blwuimtuqmcxlj2v@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200619173944.blwuimtuqmcxlj2v@e107158-lin.cambridge.arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 19, 2020 at 06:39:44PM +0100, Qais Yousef wrote: > On 06/19/20 19:30, Peter Zijlstra wrote: > > On Thu, Jun 18, 2020 at 08:55:24PM +0100, Qais Yousef wrote: > > > > > + for_each_clamp_id(clamp_id) { > > > + memset(uc_rq[clamp_id].bucket, > > > + 0, > > > + sizeof(struct uclamp_bucket)*UCLAMP_BUCKETS); > > > + > > > + uc_rq[clamp_id].value = uclamp_none(clamp_id); > > > > I think you can replace all that with: > > > > *uc_rq = (struct uclamp_rq){ > > .value = uclamp_none(clamp_id), > > }; > > > > it's shorter and is free or weird line-breaks :-) > > Sure. I just sent v2 so that people will be encouraged to run tests hopefully. > But will fix in v3. > > Do we actually need to 0 out anything here? Shouldn't the runqueues all be in > BSS which gets initialized to 0 by default at boot? > > Maybe better stay explicit.. C99 named initializer (as used here) explicitly zero initializes all unnamed members. Is that explicit enough? ;-)