Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9279692ybi; Wed, 10 Jul 2019 07:39:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPwwVETG0Anvg8DsHdvojmUl2GUZ+eYKuDDxwYcePhC4qqlI3bpSe/J7MQ0ds7wPJjciYD X-Received: by 2002:a65:498c:: with SMTP id r12mr36566013pgs.27.1562769541520; Wed, 10 Jul 2019 07:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562769541; cv=none; d=google.com; s=arc-20160816; b=c5dpNPuNW9fe2zCP/TsnMkzwa9sPjRps3xSOULBqHOUdpGO66keFhDOpk3DkTSsaM6 MZqb15gFEgYt9R2/NyfDSythCtXaPnN5PnOAeroqhEVl0YcwXzYjJZsCDu1hI4FwpWmA bVGFfBfOidzQBvMp0ktYtE9psIby1SF8aT+S5MS4S/etmDWXPU6SoMVhkgzEI80UZxQP EBjVEpVgOKpI2cS/8g46gUIEvdhldkrrIAX7O0WtMMD244xYHeZQ2jEYe3zwdUU7X4Qf igXAwf2nbA1ZOtvSPE6NtF7kQn4mP6D2zn+GJbOVmiqswZvEKw5/xzcJ+EkVXhf9Kztl WHYg== 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=oP0gIGEEx6vBWbdTS/L8mSLxPp1+udys1WsnbGP0k70=; b=kkL2i7p/MpPfC0KMA//v3aev3ajn9lq5vc7tYAHc9qtKrY+jNQg5rxKGgIQjxabBNH aq6eQzOtDmHMyFK13abYifO4BQBPMQVyU5WQH04bDURb49X+mrDuhe2jGAG40F7Gg8VT NZsNZQYwy6cLVWrSr6se6oD4LiZps9cj9A52Td4F0y3Za+GZ1dSjY0I8BlodbCJMXzEM hG8ma1kM1rbt/woEp/CmfPZNZku5N7VrAYUTTVubSqyDVy8bao8nWWrX1HAeGTqKoHdf 5r31J0lvds5yuDYWg5437fVQNpjpA7/u1+D+RkC1hJDXe0FlGmVjtcNOd+BH1A37eRPJ 2FtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=EW4PziXc; 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 e65si2359670pgc.454.2019.07.10.07.38.45; Wed, 10 Jul 2019 07:39:01 -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=merlin.20170209 header.b=EW4PziXc; 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 S1727276AbfGJOPM (ORCPT + 99 others); Wed, 10 Jul 2019 10:15:12 -0400 Received: from merlin.infradead.org ([205.233.59.134]:47690 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726458AbfGJOPL (ORCPT ); Wed, 10 Jul 2019 10:15:11 -0400 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=oP0gIGEEx6vBWbdTS/L8mSLxPp1+udys1WsnbGP0k70=; b=EW4PziXcJ7fiQlFhzwZ/7WMV8 i0F9eimJo3/kcrvfcT5B//zjqgHB2Yfx0dtSiVWdmSJ4BpPaHPVMho50d6NFjDBkDapFEwisQUv4+ 11ZNGycHQcwPgro5eauJIS7Ua1QK+oauNoNjoaL4bdrs7DfRGZVAvUB0QqwP+8FgZyAUk2+YVgiDN sY4QmsltkG3CAp9d/swzvMdIHPEUdAedz1DnW7WMsZTo2Qsgx0TDavv/DqeRaOKlqk+ch2QjyxRa3 e5Swp8gdRIDgg8awYsUG8IlxYv2WmZwtXyQuLwqa0rMTujuu9EEK3iVVoMxkbmNRgCx5GXGtc/n27 FbjiTQmxQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hlDN8-00055x-1x; Wed, 10 Jul 2019 14:15:02 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5D0FC20976EE7; Wed, 10 Jul 2019 16:15:00 +0200 (CEST) Date: Wed, 10 Jul 2019 16:15:00 +0200 From: Peter Zijlstra To: Alex Shi Cc: Ingo Molnar , Frederic Weisbecker , Wanpeng Li , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] cputime: remove duplicate code in account_process_tick Message-ID: <20190710141500.GQ3402@hirez.programming.kicks-ass.net> References: <20190709060100.214154-1-alex.shi@linux.alibaba.com> <20190709060100.214154-2-alex.shi@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190709060100.214154-2-alex.shi@linux.alibaba.com> 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 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.