Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3656968ybk; Tue, 19 May 2020 09:49:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxonyspsD6X60TIjFbArVwht9UhH+I1ZsoevZv0AK2KwMyvMqQnN7YI4CWkZg5ThNornlFE X-Received: by 2002:a17:906:9a1:: with SMTP id q1mr137782eje.296.1589906940790; Tue, 19 May 2020 09:49:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589906940; cv=none; d=google.com; s=arc-20160816; b=lj7Bc4P7zXXcefXIx/eGhiuc6QN/nnUxsBx+m5RM9Q1bK+7oX1AHch+dETmAMR2PLb CfdWLGO9eU9WdKRBuqRoWNs6PWkcCkg5uuD7pIoBgo3kz008VmWufT7ll+MsMzz0y2tL g2CLz7chyidFu1pqyg3pIzj7YnRa57QD803ClhHvdLERMipKi2BM4MQAN5FeGsQ8DCzR YGsE28MH75MmWgIjMkDhro3qUVwoFdfNUcMhlhPaSEupA5JFQeZDqrGiz7HQSRGc1TDv /sEMOApzvRrZD4LqJLJH3g1brTcHQpdvIZCsgDd32rRGHxKuX5OUpCPb9uOPLA26M0MW kBEQ== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=HJmJbdAcHUE8k0uuZkh+VDAYR44sxZvfV0NMeBrbjvw=; b=l76XvEPbRDpaA3tHYc4rF5Q/MGwrr6TAnHnZ3xupwA57kAbjQ0jfYgTXMUeBQxHO52 Es9DLVennv7oAt2xjD5A9evfaR9QNFycXAB9PVAy3g/t4g1kVB6UGJ/L1rm/st/SYehq MdcV7q2r6tSiDnpa33Voa3w+QlpVpOVKT5nzMNgQ7B3FmfQyPMNWqxCnfRz2qkN+000Z mszhYPCtLRTdIjt0PvCaPC8rnqECF0RHkDnVeHmWiEJTtOqtoj5t7A/FIB/+OOmHkpBq 4ja/pFEWAQjrvV7l6TQJl/rYkqw8iHxxWgohhDV707q+wVv+Dxe8s2smBHO6s8RmUNKE idpw== ARC-Authentication-Results: i=1; mx.google.com; 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 fy14si207919ejb.628.2020.05.19.09.48.35; Tue, 19 May 2020 09:49:00 -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; 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 S1729377AbgESQqu (ORCPT + 99 others); Tue, 19 May 2020 12:46:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:59468 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729219AbgESQqu (ORCPT ); Tue, 19 May 2020 12:46:50 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 35618AC85; Tue, 19 May 2020 16:46:51 +0000 (UTC) Message-ID: <1589906807.13984.22.camel@suse.cz> Subject: Re: [PATCH 1/2] x86, sched: Prevent divisions by zero in frequency invariant accounting From: Giovanni Gherdovich To: Ricardo Neri Cc: Peter Zijlstra , Srinivas Pandruvada , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Len Brown , "Rafael J . Wysocki" , x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds Date: Tue, 19 May 2020 18:46:47 +0200 In-Reply-To: <20200518222037.GA14829@ranerica-svr.sc.intel.com> References: <20200428132450.24901-1-ggherdovich@suse.cz> <20200428132450.24901-2-ggherdovich@suse.cz> <20200501133042.GE3762@hirez.programming.kicks-ass.net> <1588429500.8505.29.camel@suse.cz> <20200518222037.GA14829@ranerica-svr.sc.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-05-18 at 15:20 -0700, Ricardo Neri wrote: > On Sat, May 02, 2020 at 04:25:00PM +0200, Giovanni Gherdovich wrote: > > > > > > I've changed the patch like so.. OK? > > > > > > (ok, perhaps I went a little overboard with the paranoia ;-) > > > > Right, I wasn't really checking for overflow, only for when the product > > "mcnt * arch_max_freq_ratio" becomes zero. > > > > Thanks for your edit (I took note of the macros check_*_overflow, didn't know > > them). I fully subscribe to the paranoid approach. > > > > I understand you've already edited the patches in your tree, so I am not > > resending, just confirming my > > > > Signed-off-by: Giovanni Gherdovich > > Hi, have these changes been merged? I still don't see them in the tip or > Linus' tree. > Hi Ricardo, the kbuild bot found an error in this patch, the macro check_mul_overflow doesn't build on x86 32bit, so Peter Zijlstra hasn't merged it yet. This is the error: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/7GDIBOMNVDG5W2XZD4EICE2TUZR3THBN/ I'm writing a patch to avoid doing frequency invariance entirely on i386. I doubt those machines have APERFMPERF anyways. This will fix the build error. Cheers, Giovanni