Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6754589pxv; Fri, 30 Jul 2021 01:18:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYTktDD+3hnelKWFk8sEqmUPVJeaiDqZnSQpOeS66ai1kxK1pX9yMToPgqfoZVQTDgeqE2 X-Received: by 2002:a02:a913:: with SMTP id n19mr1217829jam.7.1627633106792; Fri, 30 Jul 2021 01:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627633106; cv=none; d=google.com; s=arc-20160816; b=Rsq5uumaX91eL024RD+YdUF7d9EZHd0QV3dzyyZeZGuaVxgw/8TX2c/9FP3wv452TJ zFUQNhqJnBHD0JJVR2Ot9hPDgrbF5YnsS1qwxItN/V0xxoZJ2wo5XPavAgg08pMVSevm r+Db0ZvVEMYdEYgmyEWi/pwNA4RoNDgKWcBVrQ1bXOGeGsTDQa7sLOkJn8Qqy8IWUeJp S22LHOh8Eiu1FqxO+7/xXKziC78MRJlv881uPy/j+1UYuu4tyQ/w+ZdH7DcsVbl8zT+h TGb8oYu/GGepXCtEbtBpOI1TEUj7jeuCvryrkF+GrVUfJoj2j1UuwCZRj9y6x82E5Te1 UEKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=QHEF2J4zalS6podOpxSbNv7DtVtEDXPGkVFhdqVFQXc=; b=PRgbVCQ74nfq+FUKH+5PlZztqAYsLCPjqFpMMIlk9Gr6fQaVw6fOkhTNqGOSHdPS2r +4EEZypY3FV61gc+8BeIiVq7nazg0ke7pIdei8UNPHAp+9EDSd6pb9Npj44f0aC0QGRF /Qnv+6gnrHr7e9VuwA5gVCjx5IoCkPMiuNgKy8sLfKjnSKZctMNkF1NkGDo0kJpDYegW 1ukOIJRufYk5OvtJiWAterkxOB9PZ8rdT3ZkaSfT0YoC4UdXy6a5oc6o5tVUQxf9Ovhu 9BSNZUdND0B5rcRxh21OSbkEVAlPVZncD2c0NRTLrtmjSyJKYqNHFuh1qrkdtQQsokkc n9dQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si985579ioc.2.2021.07.30.01.18.15; Fri, 30 Jul 2021 01:18:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238022AbhG3IRC (ORCPT + 99 others); Fri, 30 Jul 2021 04:17:02 -0400 Received: from mx20.baidu.com ([111.202.115.85]:50072 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237905AbhG3IRB (ORCPT ); Fri, 30 Jul 2021 04:17:01 -0400 Received: from BJHW-Mail-Ex15.internal.baidu.com (unknown [10.127.64.38]) by Forcepoint Email with ESMTPS id A450A2F309AB4AE9BE34; Fri, 30 Jul 2021 16:16:54 +0800 (CST) Received: from BJHW-Mail-Ex15.internal.baidu.com (10.127.64.38) by BJHW-Mail-Ex15.internal.baidu.com (10.127.64.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Fri, 30 Jul 2021 16:16:54 +0800 Received: from BJHW-Mail-Ex15.internal.baidu.com ([100.100.100.38]) by BJHW-Mail-Ex15.internal.baidu.com ([100.100.100.38]) with mapi id 15.01.2308.014; Fri, 30 Jul 2021 16:16:54 +0800 From: "Li,Rongqing" To: Peter Zijlstra CC: "mingo@redhat.com" , "juri.lelli@redhat.com" , "vincent.guittot@linaro.org" , "dietmar.eggemann@arm.com" , "rostedt@goodmis.org" , "bsegall@google.com" , "mgorman@suse.de" , "bristot@redhat.co" , "linux-kernel@vger.kernel.org" , "songmuchun@bytedance.com" Subject: =?gb2312?B?tPC4tDogW1BBVENIXVtSRkNdIHNjaGVkL2NwdWFjY3Q6IEZpeCBjcHVhY2N0?= =?gb2312?Q?_charge?= Thread-Topic: [PATCH][RFC] sched/cpuacct: Fix cpuacct charge Thread-Index: AQHXhGNHnHFIMTHAy0CLZm3Kh0/OWKtbLEpQ Date: Fri, 30 Jul 2021 08:16:54 +0000 Message-ID: <4bf6cd58adb5411e989530e1443f9698@baidu.com> References: <20210720060441.22550-1-lirongqing@baidu.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.22.193.253] x-baidu-bdmsfe-datecheck: 1_BJHW-Mail-Ex15_2021-07-30 16:16:54:560 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCj4gLS0tLS3Tyrz+1K28/i0tLS0tDQo+ILeivP7IyzogUGV0ZXIgWmlqbHN0cmEgPHBldGVy ekBpbmZyYWRlYWQub3JnPg0KPiC3osvNyrG85DogMjAyMcTqN9TCMjnI1SAxODoyMA0KPiDK1bz+ yMs6IExpLFJvbmdxaW5nIDxsaXJvbmdxaW5nQGJhaWR1LmNvbT4NCj4gs63LzTogbWluZ29AcmVk aGF0LmNvbTsganVyaS5sZWxsaUByZWRoYXQuY29tOyB2aW5jZW50Lmd1aXR0b3RAbGluYXJvLm9y ZzsNCj4gZGlldG1hci5lZ2dlbWFubkBhcm0uY29tOyByb3N0ZWR0QGdvb2RtaXMub3JnOyBic2Vn YWxsQGdvb2dsZS5jb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