Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934052Ab3CMRxe (ORCPT ); Wed, 13 Mar 2013 13:53:34 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:37412 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933132Ab3CMRxd (ORCPT ); Wed, 13 Mar 2013 13:53:33 -0400 MIME-Version: 1.0 In-Reply-To: References: <1362586015-27951-1-git-send-email-fweisbec@gmail.com> <1362586015-27951-3-git-send-email-fweisbec@gmail.com> <20130307143246.GB1859@redhat.com> Date: Wed, 13 Mar 2013 18:53:31 +0100 Message-ID: Subject: Re: [PATCH 2/2] sched: Lower chances of cputime scaling overflow From: Frederic Weisbecker To: Stanislaw Gruszka Cc: LKML , Steven Rostedt , Peter Zijlstra , Ingo Molnar , Andrew Morton Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 887 Lines: 21 2013/3/12 Frederic Weisbecker : > 2013/3/7 Stanislaw Gruszka : >>> + } else if (!total) { >>> stime = rtime; >> >> I would prefer stime = rtime/2 (hence utime will be rtime/2 too), but this >> is not so important. > > I can do that. I eventually kept it that way. Reason is that tasks always spend at least a bit of time in the kernel when they are scheduled for the first time. But they might never go to userspace, as in kernel threads. So I prefer to stuff everything in stime by default. Having (total == 0 && rtime != 0) should only happen for very low values of rtime anyway. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/