[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH RFC] xen: Annotate printk() as cold


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 21 Feb 2023 12:08:28 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • 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=HyQhtl55amC85ClUqlqFMX619EtzJopA5hlA96JbDP0=; b=ETIARZ3ZlcU2RwhAFd3dI8UXV5NsOlBB2mvLDGIn53177OM7eabor2sSdEyunQkLhofyohSwnb5u/u44eI/9SnprUDmwSNZSq1PDNADjSd26Vuaee1E6aLoe/p+weqvbOQq0yP19CdyidFZxVqg6NWecmLlxc+MX2b0HxSED4tpCab2VLx6KQi6IwT6HLi/FRLivRUxROUf5mCHK3fnTnJvXYeznc1g5AVSA3r/98l0TkaZS5oZun2Winz4M7xqDxzw3zWpU9+ypc8pJiuFZGZBq/I4GuOrSx1b1oys+rttwM7apl7VxnyhR9DVzyPa6sXsDcYOLtewCbf2iIg6skA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z30V7QMiDnKXkPwEAGKTNlDUE8xJa1GnNJKf5KrWkJaTSvQ3K4r6qmy1ahB2Epjbn/HZpr3GpVrWSy34xIdGI3o+QjwKmGEdypa2aQrQUjG8UmqBVc5ksapkvLPtC0/evTBLuVVi5rZrlpuLTBDOf7gvq9mYzic7knKzTLMjTFuouyijGbxSbv7ZWAV/vMEotJC+TzJdg9YE2LpC0dOZ1pDP8z5Txlnh7lQnUNAxZIDVHfSn0DgphnHBAdY1nbMVe0ZLgKwukQSbHpxJIb/HMS8f3OdhFTpl4R5ru492wLssezHTpC9EAc9aIsatDQzhIfiwTTnfrp5jhCjIvuuRJQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 21 Feb 2023 11:08:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.02.2023 14:13, Andrew Cooper wrote:
> There is no such thing as a fastpath with a printk() on it, making printk() an
> excellent heuristic for slowpaths.
> 
> Net delta is:
> 
>   add/remove: 595/2 grow/shrink: 56/762 up/down: 70879/-87331 (-16452)
>   Total: Before=4085425, After=4068973, chg -0.40%
> 
> because cold functions are optimised differently.  For example, one function
> with a particularly large swing is:
> 
>   vmcs_dump_vcpu.cold                            -    2172   +2172
>   vmcs_dump_vcpu                              7030     408   -6622
> 
> with a net delta of 7030 down to 4450.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

> There are other functions which will be good heuristics to annotate, but we
> probaby want to collect .cold together in one location rather than having them
> spread out across all translation units.

Doesn't the compiler put it in .text.cold? Or is that compiler variant
and/or version dependent?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.