linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netdevice.h: Add __cold to netdev_<level> logging functions
@ 2019-02-03  3:47 Joe Perches
  2019-02-04  4:28 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2019-02-03  3:47 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, LKML

Add __cold to the netdev_<level> logging functions similar to
the use of __cold in the generic printk function.

Using __cold moves all the netdev_<level> logging functions
out-of-line possibly improving code locality and runtime
performance.

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/linux/netdevice.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 579d132a75ff..b6c6d2fe17b0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4671,22 +4671,22 @@ static inline const char *netdev_reg_state(const struct net_device *dev)
 	return " (unknown)";
 }
 
-__printf(3, 4)
+__printf(3, 4) __cold
 void netdev_printk(const char *level, const struct net_device *dev,
 		   const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_emerg(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_alert(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_crit(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_err(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_warn(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_notice(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_info(const struct net_device *dev, const char *format, ...);
 
 #define netdev_level_once(level, dev, fmt, ...)			\



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] netdevice.h: Add __cold to netdev_<level> logging functions
  2019-02-03  3:47 [PATCH] netdevice.h: Add __cold to netdev_<level> logging functions Joe Perches
@ 2019-02-04  4:28 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-02-04  4:28 UTC (permalink / raw)
  To: joe; +Cc: netdev, linux-kernel

From: Joe Perches <joe@perches.com>
Date: Sat, 02 Feb 2019 19:47:25 -0800

> Add __cold to the netdev_<level> logging functions similar to
> the use of __cold in the generic printk function.
> 
> Using __cold moves all the netdev_<level> logging functions
> out-of-line possibly improving code locality and runtime
> performance.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Sure, let's give this a try.

I'll push this out to net-next when my build testing completes.

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-04  4:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-03  3:47 [PATCH] netdevice.h: Add __cold to netdev_<level> logging functions Joe Perches
2019-02-04  4:28 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).