Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10143166ybi; Thu, 11 Jul 2019 00:17:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMgpPxMEReYy7swcOVSZOywV41xqsQju2WItZtK9EqWITDjaNOKyjrRUlCBdp51YZYhN8e X-Received: by 2002:a63:4803:: with SMTP id v3mr2834352pga.347.1562829479640; Thu, 11 Jul 2019 00:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562829479; cv=none; d=google.com; s=arc-20160816; b=cW3Nc1iOoFIcJSXKD7IufzrYitoWJCZ9Vax7NTn1ImzmFqzE6KtFUNQ7Iq2rVYq4/9 IxrZx3IdC6xbj7+mhJwhnxl5cdeKDfeMnwU7tvpLI8h5+Rfv8FwppzNSgDmV2JR73HD7 KSgcpBmWWKHqqShznGPQbAEVx5CRcn2VGIYxkHMJmN388unIuaU/CBGzwrBFDH5LljOi YYgP7go2fKA+zKqBE6b4cXPzbksg+8zr0NhO1uQv9bdvchWtZCXAAFfVD7QAMjVJfoLX xmKcbogO/Ht3+4DMSsP8T4po9710/bwJONUwVAvKjrK5vL+NmFVnpoCZS3MTs7KQyBn0 pq2g== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=h0j9m15P+Oh09+iniyznvYQoxTdXxpKuNUQqoHA1nUs=; b=nEYJpbu2w7S0kfELfgNU0USnX8oukteHoImWVrIyymcPmyciPfOCndKTTW714kzHOK fxG5dAlrDDUurCAFrZOf11SUZXz/y82HJg+W//o26g4XFj9GEM3rGamHUoWFtcBO5X3n 2AR3dc3JNexnO7Q/r/bX6joKlIakM4xba3BxRt9hxIUU2NGQ97FEumXyCdeOjwLQk7QC WWzECP+7MRegXC2ulhGb1jDc5jIcDSrIb5q0pCnhEAExnMWLca7vT7pyXbHcwAWBfL1U 8ECLhmtw/Aazyu7uhcbscVNfwjC+eBixJnDOiRuA5GW4sRCzJdnADsbQwiSZL61E09tO 3p/w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b35si4195020plb.249.2019.07.11.00.17.43; Thu, 11 Jul 2019 00:17:59 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727796AbfGKGli (ORCPT + 99 others); Thu, 11 Jul 2019 02:41:38 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:51069 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725963AbfGKGli (ORCPT ); Thu, 11 Jul 2019 02:41:38 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R591e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04446;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0TWb7dXD_1562827284; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0TWb7dXD_1562827284) by smtp.aliyun-inc.com(127.0.0.1); Thu, 11 Jul 2019 14:41:24 +0800 Subject: Re: [PATCH 2/2] cputime: remove duplicate code in account_process_tick To: Peter Zijlstra Cc: Ingo Molnar , Frederic Weisbecker , Wanpeng Li , Thomas Gleixner , linux-kernel@vger.kernel.org References: <20190709060100.214154-1-alex.shi@linux.alibaba.com> <20190709060100.214154-2-alex.shi@linux.alibaba.com> <20190710141500.GQ3402@hirez.programming.kicks-ass.net> From: Alex Shi Message-ID: <0c3ce3c1-5a7e-314a-97f8-8270cc6ed990@linux.alibaba.com> Date: Thu, 11 Jul 2019 14:41:24 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190710141500.GQ3402@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2019/7/10 ????10:15, Peter Zijlstra ะด??: > On Tue, Jul 09, 2019 at 02:01:00PM +0800, Alex Shi wrote: >> In funcation account_process_tick, func actually do same things with >> irqtime_account_process_tick, whenever if IRQ_TIME_ACCOUNTING set or >> if sched_clock_irqtime enabled. >> >> So it's better to reuse one function for both. > > But it's not the exact same.. and you didn't say, not did you say why > that is fine. > Thanks for reply! The irqtime_account_process_tick path was introduced for precise ns irq time account(abb74cefa9c682fb sched: Export ns irqtimes through /proc/stat) while account_process_tick still use jiffes. but now both pathes are using ns cputime. And there is not strong reason to keep 2 very very similar path coexists. That's the reason I believe unite the collection is better. Thanks Alex