Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5886790ybp; Tue, 8 Oct 2019 09:41:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqylwAkMrrO3PpZTie08C2pIGUtLjgLGmJrQ28AyMNQLAA8bRgLGjfynSCoCCdYamV8SJa9g X-Received: by 2002:a17:906:3110:: with SMTP id 16mr15371654ejx.306.1570552911183; Tue, 08 Oct 2019 09:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570552911; cv=none; d=google.com; s=arc-20160816; b=BpypBDuc/yZdkt2DkNv4Svw6EZD/fffnmpvLewRzRwvus7H6TVIGjnNeKNKLibNnrZ /QTKhB5jTXVN8B/514hozP91izutnmNYjcyr56EG70sNm/VQlf7cEefzDmy3aEhrAYF+ yFRBxDLLwPcrJlsftOFzJ2jpRd7m165Wyg2nzSWyQFWVQPBJQcGpD8G+eWIy9HuPxp5j dxNTkmv+jS3GE22TmZCv74NiAF1Dv4w3l+QE84hLy3eXPVC0r7vvHSEdITEGQdAbmFo+ +PByFyJ+sJL9gnmuuurc3iKP2cPC/33japgNLVIB2VO1eIGi9XL3ps1qCdfMp8t7zdJN gvTA== 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=npJ0D1Kk4qVybCBnLi4WNngklh9MRMO5nJ1Iub4Gk8U=; b=NzHPAAMA96I8Uo+gP/n+zS0zEDzkFTZ5e6UfxM2G3riPVjd2nDGUSQv9VEtO4BUWN2 mTHvUSrX4fGUUflk3uaXrPd4rTlznzwN1sAxpUTjQAuNj3NHGKleqkgSY8/tlRXDu609 2Px2Vf51HJTv0vzC08adBsqxoWmCpeL8SGpzhmg3BUx4e+XYYq+RS9+px3/xi2EI0MJb /RxTXF33Ga4zurbanm/jcJhoNDocWEOcB5PDSnScQek5pg2boEZyo5DVzP4dJ6wXZx+v JM0SEEV5SI+CXcyIWZdHZzVrE1z5REny07fsOi3aCcIZQvQnbx/yyyuZLc5YoW5PzZQ4 k+OA== 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 b16si10932751edb.341.2019.10.08.09.41.26; Tue, 08 Oct 2019 09:41:51 -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; 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 S1728182AbfJHQjb (ORCPT + 99 others); Tue, 8 Oct 2019 12:39:31 -0400 Received: from foss.arm.com ([217.140.110.172]:40992 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbfJHQjb (ORCPT ); Tue, 8 Oct 2019 12:39:31 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7B9701570; Tue, 8 Oct 2019 09:39:30 -0700 (PDT) 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 3ED123F6C4; Tue, 8 Oct 2019 09:39:29 -0700 (PDT) Subject: Re: [PATCH v3 04/10] sched/fair: rework load_balance To: Peter Zijlstra Cc: Vincent Guittot , linux-kernel , Ingo Molnar , Phil Auld , Srikar Dronamraju , Quentin Perret , Dietmar Eggemann , Morten Rasmussen , Hillf Danton References: <1568878421-12301-1-git-send-email-vincent.guittot@linaro.org> <1568878421-12301-5-git-send-email-vincent.guittot@linaro.org> <31cac0c1-98e4-c70e-e156-51a70813beff@arm.com> <20191008141642.GQ2294@hirez.programming.kicks-ass.net> <20191008163357.GF2328@hirez.programming.kicks-ass.net> From: Valentin Schneider Message-ID: <5de71c9f-cd6b-0284-f4a0-0d1fe4059099@arm.com> Date: Tue, 8 Oct 2019 17:39:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191008163357.GF2328@hirez.programming.kicks-ass.net> 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 08/10/2019 17:33, Peter Zijlstra wrote: > On Tue, Oct 08, 2019 at 03:34:04PM +0100, Valentin Schneider wrote: >> On 08/10/2019 15:16, Peter Zijlstra wrote: >>> On Wed, Oct 02, 2019 at 11:47:59AM +0100, Valentin Schneider wrote: >>> >>>> Yeah, right shift on signed negative values are implementation defined. >>> >>> Seriously? Even under -fno-strict-overflow? There is a perfectly >>> sensible operation for signed shift right, this stuff should not be >>> undefined. >>> >> >> Mmm good point. I didn't see anything relevant in the description of that >> flag. All my copy of the C99 standard (draft) says at 6.5.7.5 is: >> >> """ >> The result of E1 >> E2 [...] If E1 has a signed type and a negative value, >> the resulting value is implementation-defined. >> """ >> >> Arithmetic shift would make sense, but I think this stems from twos' >> complement not being imposed: 6.2.6.2.2 says sign can be done with >> sign + magnitude, twos complement or ones' complement... > > But -fno-strict-overflow mandates 2s complement for all such signed > issues. > So then there really shouldn't be any ambiguity. I have no idea if -fno-strict-overflow then also lifts the undefinedness of the right shifts, gotta get my spade and dig some more.