Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp928402ybx; Thu, 7 Nov 2019 04:50:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwx+gD/q8PzJxH7d5TyHZxr/ozORl9PeEV4D4YBBZZbt1DLy5YpTHtg8P/iemXtLeKYHqAF X-Received: by 2002:a17:906:79c9:: with SMTP id m9mr2711300ejo.297.1573131016825; Thu, 07 Nov 2019 04:50:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573131016; cv=none; d=google.com; s=arc-20160816; b=r/DxaJNeklsi36Nd1lxNEErccenpWS1j80I+f5XvdHTf95HycW7NTILvFHAsc77rbZ tKI4yFpuVRHSfZqfAgmI6wGA+Yx9Igw3u2NaNzn0ZwdsBvPAEgDJy27XDedzshTlB56M puh6usgfZrQyuHxwu5EUtfLEDaQui7Coe1Pr2X73/LDTKdQ2mMUwBXYH7Wgx2Ttgj3UO UmlvV0KWIA59fVU58FBoQPJqndlgUKjJNM/MG+4Hukp5FZE2su4BM00nJQbRxJPYszSW t/606/R+m+EWikacDpFAaQtnWBRLqen6+hgcpF/Dt/Wzo22bfnMqQ1yNfV0qRDtLa9cR uboA== 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; bh=Xa3xcbvcNii0ckLDCeWLHK/ql7ey1ORYLLY0djGGeQI=; b=LrJ3KWkamZhyYIr0KO1PrYPZl7fDto9cYm/UujuENVdI2aRcVKkOwj+X7Mi2+ZloXB QeB7NACMmKVlDT9XSSgD5didioyL24WgZ/zHP0FyQWgfgMcl9oiEGhgpPwarpQbraugI dGvWsbPvor8NwnrBqKPctWIqZE7r4i9V5LlvofF/3jNCwEBYZ8ot1D8M/WvSStpqdvJO SRlWzdWilvSRQhxa7ecXEUzU8cLFUig8yw1ZXjeioD7cYhRdhKL0dGEBhbCte4zOQPMo pktTkmVu841Ye6cMLGggCgq2vR2uu+pWPPhQySZKCR1VSUvqHr9hYCajD1+/e9VYjbvZ koCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=G+b5F0zs; 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 s7si1437002eds.215.2019.11.07.04.49.53; Thu, 07 Nov 2019 04:50:16 -0800 (PST) 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=merlin.20170209 header.b=G+b5F0zs; 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 S2388646AbfKGMqZ (ORCPT + 99 others); Thu, 7 Nov 2019 07:46:25 -0500 Received: from merlin.infradead.org ([205.233.59.134]:60264 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388407AbfKGMqY (ORCPT ); Thu, 7 Nov 2019 07:46:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=Xa3xcbvcNii0ckLDCeWLHK/ql7ey1ORYLLY0djGGeQI=; b=G+b5F0zsTBN+89jWdmm+g3GUT dAp0DdRzLdcdJt3d/VA9pu3ahL7Uspd+ccWn2SDhwCutIaN0FES4q/uTVaUihfitkSe/4BPdomRBn jo2BbmEllza+WOBsq0BCfHtnJhco/BmOP5Z7J8n4+8EHBdPb2kF9i13edAE+GgFtAq1DbufjCSUnZ mUg8UYhtZLV80L2GVxYA3KoIyDK8pD7pnfhay26rVUDZ5ftZelLPpWLsueZNXIdBqZKa79+myWtc/ unCYTqzClb1hBngRB896GlSl7hagF6dkPl2XUpi1wapvGxfmKvQmtYKWYb7jwJ97kDrKR3Wn0YF69 eOHvcNAYA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iShB4-0005kt-9O; Thu, 07 Nov 2019 12:46:18 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 1144A301747; Thu, 7 Nov 2019 13:45:11 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 91DF52025EDA7; Thu, 7 Nov 2019 13:46:15 +0100 (CET) Date: Thu, 7 Nov 2019 13:46:15 +0100 From: Peter Zijlstra To: Thomas Gleixner Cc: Jan Stancek , linux-kernel@vger.kernel.org, ltp@lists.linux.it, viro@zeniv.linux.org.uk, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, rfontana@redhat.com Subject: Re: [PATCH] kernel: use ktime_get_real_ts64() to calculate acct.ac_btime Message-ID: <20191107124615.GG4131@hirez.programming.kicks-ass.net> References: <20191107123224.GA6315@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.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 07, 2019 at 01:40:47PM +0100, Thomas Gleixner wrote: > Typing real_start_time makes me really cringe. I have a patch fixing that... --- Subject: kernel: Rename tsk->real_start_time From: Peter Zijlstra Date: Thu Nov 7 11:07:58 CET 2019 Since it stores CLOCK_BOOTTIME, not, as the name suggests, CLOCK_REALTIME, let's rename real_start_time. Signed-off-by: Peter Zijlstra (Intel) --- --- a/fs/exec.c +++ b/fs/exec.c @@ -1132,7 +1132,7 @@ static int de_thread(struct task_struct * also take its birthdate (always earlier than our own). */ tsk->start_time = leader->start_time; - tsk->real_start_time = leader->real_start_time; + tsk->start_boottime = leader->start_boottime; BUG_ON(!same_thread_group(leader, tsk)); BUG_ON(has_group_leader_pid(tsk)); --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -533,7 +533,7 @@ static int do_task_stat(struct seq_file nice = task_nice(task); /* convert nsec -> ticks */ - start_time = nsec_to_clock_t(task->real_start_time); + start_time = nsec_to_clock_t(task->start_boottime); seq_put_decimal_ull(m, "", pid_nr_ns(pid, ns)); seq_puts(m, " ("); --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -879,7 +879,7 @@ struct task_struct { u64 start_time; /* Boot based time in nsecs: */ - u64 real_start_time; + u64 start_boottime; /* MM fault and swap info: this can arguably be seen as either mm-specific or thread-specific: */ unsigned long min_flt; --- a/kernel/fork.c +++ b/kernel/fork.c @@ -2130,7 +2130,7 @@ static __latent_entropy struct task_stru */ p->start_time = ktime_get_ns(); - p->real_start_time = ktime_get_boottime_ns(); + p->start_boottime = ktime_get_boottime_ns(); /* * Make it visible to the rest of the system, but dont wake it up yet.