From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932301AbdA3PDD (ORCPT ); Mon, 30 Jan 2017 10:03:03 -0500 Received: from mail-wj0-f195.google.com ([209.85.210.195]:33380 "EHLO mail-wj0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932125AbdA3PC4 (ORCPT ); Mon, 30 Jan 2017 10:02:56 -0500 Date: Mon, 30 Jan 2017 15:56:49 +0100 From: Frederic Weisbecker To: Stanislaw Gruszka Cc: Ingo Molnar , LKML , Tony Luck , Wanpeng Li , Peter Zijlstra , Michael Ellerman , Heiko Carstens , Benjamin Herrenschmidt , Thomas Gleixner , Paul Mackerras , Fenghua Yu , Rik van Riel , Martin Schwidefsky Subject: Re: [GIT PULL] cputime: Convert core use of cputime_t to nsecs Message-ID: <20170130145648.GA16945@lerouge> References: <1485751603-15913-1-git-send-email-fweisbec@gmail.com> <20170130143223.GC2669@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170130143223.GC2669@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 30, 2017 at 03:32:24PM +0100, Stanislaw Gruszka wrote: > On Mon, Jan 30, 2017 at 05:46:43AM +0100, Frederic Weisbecker wrote: > > Now lets admit one drawback: s390 and powerpc with > > CONFIG_VIRT_CPU_ACCOUNTING_NATIVE have new cputime_t to nsecs conversion > > on cputime accounting path. But this should be leveraged by the recent > > changes which delay the cputime accounting to tick and context switch. > > I think it would be worth to mention that there are other drawbacks on > 32bit architectures that use cputime-jiffies currently, like: > - cache utilization will be worse Due to utime and stime becoming 64 bits? Yeah indeed. > - conversion cputime_to_jiffies() and cputime_to_clock_t() (with HZ == USER_HS) > will no longer be an no-op Yes probably some cputime_to_jiffies() have been replaced with nsecs_to_jiffies(). In turn many cputime_to_nsecs() are now no-op. Now concerning cputime_to_clock_t(), it seems that USER_HZ=100 most of the time. This value seems to be seldom used for HZ on distros in general. > - to keep values consistent will need to add protection of u64 store/load, > which will create additional performance costs Yes but note these issues were already there before this patchset. Especially for kcpustat. And utime/stime also have these issues under CONFIG_NO_HZ_FULL. Now this patchset extends the problem for utime/stime to all configs. That's certainly one more reason to fix it. But that's outside the scope of this patchset.