Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp390194imm; Mon, 9 Jul 2018 03:50:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcZ83bWWqsUVmm/B/PaR6GLdcAfVrWcWvsSnp5olO4aOEdYMjkHo+bn+lI2ZqM2UmNaJrGs X-Received: by 2002:a17:902:6b47:: with SMTP id g7-v6mr20367934plt.251.1531133431752; Mon, 09 Jul 2018 03:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531133431; cv=none; d=google.com; s=arc-20160816; b=qLv2lmeEW3B2HRxYcbV8ObwexvUzHY+v4b9l4DF9qvIfYWrgIe7pspvhI4DRSyYham chvlN3wKWyZW3v3qayamtUsrfwHALix5vTxUJz+i7j/IbyAWw8+OrDdQfK7YLVNNKD6+ tvIsbHzbUQuLKO5XA3vWHMVk8RRTQTknYFJHmplkZ33EYu49/md+TRbZiSes1uTQHOdx SgetXaCtE48mqaa6r+9FCEqXu+tWQQzN90PmpXlMER5ZUTh3+GxNsx1kDdzzCo5mVgjP 5ok1jjVYBhlxgOnEr+kyLYC+16dNkvyY1kOQvBQo2m0S/gItV0vUaF6ggpBCCxJkkIw6 jaeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=awv1x8h65NiTYcOVka/VNUxM6U7CJ1bsWXJ5bd7iHcI=; b=nED2HEKt+rxkFQj9EhG1i6/3erUNtB9jSk4f0IvteUNT2jTvX25MCqDJ2MJWzPEBbg KZSeF0ituRGrHV1gCjMiEacjHx5Cqs6oW3JE4qqkFRfw0i3hJ6zdQffBp7oERh/TJpa4 UKSf0AfsyLsv5lakUaEXvKPYaAfQqAAJgfExMGauYQdQ92RE2f7rO4/hW0DpsGdFKEBU AgMi7WTqVSRy+pfDR4prgx59xyqWYEIHbLWihv4CorWUnvnRApguapEmZ9yon42dirQy 81JY2IE3O0DoADrHGBDoZ3GG87aIR35TBf+e5yV2TCSEbKCPf5VL+WCxjbc+a5sd9Yqk hImQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=RI6Rz+mJ; 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 g1-v6si14530459pld.11.2018.07.09.03.50.17; Mon, 09 Jul 2018 03:50:31 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=RI6Rz+mJ; 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 S932677AbeGIKsF (ORCPT + 99 others); Mon, 9 Jul 2018 06:48:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:36638 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932278AbeGIKsE (ORCPT ); Mon, 9 Jul 2018 06:48:04 -0400 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=awv1x8h65NiTYcOVka/VNUxM6U7CJ1bsWXJ5bd7iHcI=; b=RI6Rz+mJwfyx+g/m0lAeXzaG0 qjXeDeokgXRdxCIZCapd6ViqsCsnvlz9fqRmIyu4I7Ng6MMhUSH32IOcYX3BBf8gJ4/IiorY+MdiR ym9i04P+Xl+ajZp8lJdxMV3wM2ljZVQu/2hchbh7xkdf4fiwZyFaH/5zQlEhqRp2SMEceAyiRv8zb ywUQbLbuRUZZAJWo80KmSBY+4ndh8EXvWyKePyy9f/klsvMPzbSjEwU1K/wbRd6N9A+NnXMcOSfCS GP6Wwgvlb8Zmki+S1/psggd3mGM3hbAW8qnhlUXcI3VHTVbb1ls522HceOmk7rbRzzofjTbpUCVBw 0S2lt9mkA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcTi5-0003hP-C7; Mon, 09 Jul 2018 10:48:01 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D82E52029764D; Mon, 9 Jul 2018 12:47:59 +0200 (CEST) Date: Mon, 9 Jul 2018 12:47:59 +0200 From: Peter Zijlstra To: xunlei Cc: Xunlei Pang , Ingo Molnar , Frederic Weisbecker , Tejun Heo , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion Message-ID: <20180709104759.GJ2476@hirez.programming.kicks-ass.net> References: <20180622071542.61569-1-xlpang@linux.alibaba.com> <20180626154908.GE2458@hirez.programming.kicks-ass.net> <20180705104632.GE2494@hirez.programming.kicks-ass.net> <20180705134214.GF2494@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 05, 2018 at 09:58:50PM +0800, xunlei wrote: > It is rtime < utime + stime, that is the imprecise tick-based run time > may be larger than precise sum_exec_runtime scheduler-based run time, it > can happen with some frequent run-sleep patterns. You're still comparing two values that should not be compared. utime + stime is not a run-time. You _CANNOT_ compare to rtime and doing so means you're still not getting it.