From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 29126A0351; Tue, 22 Feb 2022 17:32:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B1C6A40DF6; Tue, 22 Feb 2022 17:32:36 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id C874540DF4 for ; Tue, 22 Feb 2022 17:32:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645547555; x=1677083555; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=EJhSJwq9QMinHCdUAcGQ/j0vNU8yhBHjGce74c0TqQw=; b=LHjOLC/KplmdEzv6dHzV3LXHGgBSjljW9j2lb3ZVgFODG45CJKxeBl5p Jd83GPfuYb+RRT1NB+KMZjN5XyYcZOmOt0Ihig+O9LIvfFYtDEkS1J0qY lf3M8MHdaBmyWf4RWnkkzfqKagOSQGN4wJAg5y6rtAFszWj/3Y41ZGO4P 7rZuiv69o7EgxPi6qUoNXkFXy/LdvQzwrc1soJVBqP9Oyq0VATUvTr2sx Gp4qKcIgBUZ9/LPck2j7J7O6Xeze57OVXFVGAM20UIg1NPVHQ2t8KLhUh iq0xQjccmyhe/WvatgZzNBKrfMg0qh0Rb2/LT5WfTdXsFFBHfkAj0/eSu A==; X-IronPort-AV: E=McAfee;i="6200,9189,10266"; a="249330481" X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="249330481" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2022 08:32:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="490853384" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga003.jf.intel.com with ESMTP; 22 Feb 2022 08:32:33 -0800 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 22 Feb 2022 08:32:32 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 22 Feb 2022 08:32:32 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 22 Feb 2022 08:32:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e1TD2oMOXo5gq84/XECTogHDbO9rj66wp5JTJW9JlpVdUdzEN2sIMvl3c62uiSKxg7TGEFEhZL1RVT1bExYk0uZwcwtFTsBeezL/1Qjs3kUhDafgTAkJei6jHV7H2Y5cpZWNN7EPVnKlNivQZ2HVGzPjpcEA4gCD64/gaDpsVzy3TUC7t0QZqYsQN0yNBdx4x2cArP08GcmQdPE7itS2ExPZjxntdDeCZD69Ll5gpK1SSqja6JWCLMxD8mZHo6LzWTMZ3dKPb1PxkZmT6K5ZacTVwv1YJypbi7s+XuTF4MG0bUP5HfjrHXaiVgfCdfRlOQCylvoPhHv8/X4L9m3KMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G99ow2JmyU7EmLnqWP82fkHUV6dZU9vHfeWwBIbL0xo=; b=AZZ1lGpug53YlberNretz9WYkVDAhkMQ4wrIKH2xKAV5CKjhnI/3JmBx/71Cq4QwcTKJ/cnKC+sa9gABPRf8rw8TBmuSme5Q/4SaTD+bk9LjHgf0H9zUTOCCesJXK93dxqN4EbheNT7Dv9PoIDqtA1bXoDZObGVEL+767poFZYjg7jN9EUAMcJzm3u1f5VaIasMaHxVVHnjIfAFBPr+Bn/PBRcKjLCJII+i1FvmtNs54obv6qGdJ3AkBJ10mfqgyxYitXBeaRzp1gBv8YExelvevTcNIjVC6YHkIYiMghgHcoCVHxX55mBiE5HWVqie9aGaPmM/PuH4LrrrxTLCzQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB3799.namprd11.prod.outlook.com (2603:10b6:a03:fb::19) by MN2PR11MB4286.namprd11.prod.outlook.com (2603:10b6:208:18d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.17; Tue, 22 Feb 2022 16:32:30 +0000 Received: from BYAPR11MB3799.namprd11.prod.outlook.com ([fe80::6d2e:b8c1:3247:f9f9]) by BYAPR11MB3799.namprd11.prod.outlook.com ([fe80::6d2e:b8c1:3247:f9f9%3]) with mapi id 15.20.4995.027; Tue, 22 Feb 2022 16:32:30 +0000 Message-ID: <075cf990-f0b8-8a8c-94c4-420f185e9e94@intel.com> Date: Tue, 22 Feb 2022 16:32:23 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.6.0 Subject: Re: [PATCH v1] power: add wakeup log To: Miao Li , CC: , "stephen@networkplumber.org" References: <20220222135227.631275-1-miao.li@intel.com> From: David Hunt In-Reply-To: <20220222135227.631275-1-miao.li@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0274.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:195::9) To BYAPR11MB3799.namprd11.prod.outlook.com (2603:10b6:a03:fb::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0f7cc04-f01d-47ea-db4d-08d9f620eb89 X-MS-TrafficTypeDiagnostic: MN2PR11MB4286:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oP4jjIl46KF0p7wjZ02xmxjGCeySeIzTXlTtJRxPory1Pd9gcLNJ+ylAkOR0Pwd0aXG+2oZBHN+vzWJ3JMCC2dvBv11/UpZ8bT88nkZF3v4fGQhTC86tZ5cR/HqUQuO/dUJrD+qmza40MkR3sStqpmz+Wu8kBtSKKLglNSM5Ok6rwRSJ9l/jrdx3Kb1Y2IkE47GyYrcNcA9AvpEAFFevHAx3ToX7Si6cF7o3TR1veCWFlWFae69Oig2y2SCGk3rgLCwF+HETF5OBI6R+IiU01vqTTueRCiAJxA2fY/zP64JfMJ6OKTKqcedyveGpbii3gWJQTf0zYM569GlQqpWO+iCx+GTBZUkTqq/HewodR8pWRhHmXRBvf2plz5AV8RE6rHUI9yc1KH0E0SyLn9ghPW0rWNEk9+PhEaC7NBnSHMj0qbpu8N8Q1fCWsY1fn1RotYKI5j/Vznl1VDduhu2oIK3ypEBmJRtSBbv4tYsfh3Ax3I4wVyfqguap7RnaKKoeuDH4Oh8IbczNQwLBUkKff1F2mKyYwW52c96CbClVS/p2hll7xTKySyufQXZprY9UD+MB1o4wouLs2kO1+14aYYtWhvUhoRLOwZU7TH12GowCx6tWyC31O0uuFRb62pgWbBlBXD0O5UnUk7ju98VQW01fyzwPESpEQ2gLQ9CjYlF0IxKuPzpTR3Ay0WfacsFqXoDP3/WmxIS0xxTuKhFqVkzJ38tsjURZmm4Bm2GBGVo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3799.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(316002)(66556008)(2616005)(5660300002)(31686004)(2906002)(8676002)(82960400001)(66476007)(6506007)(36756003)(6512007)(38100700002)(6486002)(508600001)(8936002)(53546011)(44832011)(66946007)(86362001)(26005)(31696002)(4326008)(186003)(6666004)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VFpic0Y4b3I1OFZaZDlEU3NvbGY0ZTBTY2pIWDdDYW9TVndnY3BJVmZ2alRQ?= =?utf-8?B?MUJseUZvZDY3aGJ1bDVCUkllTi84aEFhRHZnQnhzU3JGMGNXKzRwcVk0djdJ?= =?utf-8?B?RXZrMmFVbWEzeTV5c2Rpd243ZVcyZVFuUnpnSm1BbDZBQUc2eENvTFBwbVpq?= =?utf-8?B?aW1MY0RmQ0t4ZXQ1NC9xckM4WXljdlVJV0Q0WkJPblYyRUJrSDZrcHdHMEpW?= =?utf-8?B?Q1F5aU1sOGZhcTAzTC92Z0s3TnlLL2RKQ1pXbm9qUFdVRWx2cWNrSWVhT1hw?= =?utf-8?B?WUFxTDlMWTlQK0FrRjNZanJGTGhkU05WTkJCUUp0RlEvRU5WWmhNak94RnJZ?= =?utf-8?B?bWt2RWVwVnFXVWoySE0zb3pIMzgxblpSRzcrd1ZiQzN0NEJnWDAwcncyUnhZ?= =?utf-8?B?a21BdEx2eExkSkZybFNFZEs2SHFKNkdmY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-08d9f620eb89 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3799.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2022 16:32:30.4296 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YYFNQEYeP3kKppcKcI1lINi1czqZusU4RQEu4+UETgn61Kyqmtuj8uikwZxLqK6RSeOqi7P82ndCdRLLqLnOoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4286 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 22/2/2022 1:52 PM, Miao Li wrote: > This patch adds a log in rte_power_monitor to show the core has been > waked up. > > Signed-off-by: Miao Li > --- > lib/eal/x86/rte_power_intrinsics.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/lib/eal/x86/rte_power_intrinsics.c b/lib/eal/x86/rte_power_intrinsics.c > index f749da9b85..dd63e2b6eb 100644 > --- a/lib/eal/x86/rte_power_intrinsics.c > +++ b/lib/eal/x86/rte_power_intrinsics.c > @@ -128,6 +128,14 @@ rte_power_monitor(const struct rte_power_monitor_cond *pmc, > : "D"(0), /* enter C0.2 */ > "a"(tsc_l), "d"(tsc_h)); > > + cur_value = __get_umwait_val(pmc->addr, pmc->size); > + > + /* check if core has been waked up by changing monitoring value */ > + if (pmc->fn(cur_value, pmc->opaque) != 0) > + RTE_LOG(INFO, EAL, > + "lcore %u is waked up from value change\n", > + rte_lcore_id()); > + > end: > /* erase sleep address */ > rte_spinlock_lock(&s->lock); Hi Li, If I'm not mistaken, a similar patch was added to a previous DPDK release and then removed because of the enormous performance impact. This looks to be something similar, and it's adding a log message to a low-level function. Also, as mentioned before, the intention in the future is to call this function much more agressively, so there would be hundreds of thousands of messages every second. We cannot add an RTE_LOG here. Please rework and put the log in the test case instead. Also, regarding the wording, I would suggest  "lcore %u awoke due to monitor address value change\n" Rgds, Dave.