Skip to content

Coldify, constify, purify (function attributes)

David Sterba linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: add __cold attribute to more functionsfs/btrfs/disk-io.c fs/btrfs/disk-io.h fs/btrfs/super.c +1 more+6 -62 replies
2/3btrfs: add const function attributefs/btrfs/ctree.h fs/btrfs/super.c fs/btrfs/volumes.c +1 more+4 -42 replies
3/3btrfs: add __pure attribute to functionsfs/btrfs/async-thread.c fs/btrfs/async-thread.h fs/btrfs/ctree.c +6 more+12 -141 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNikolay Borisov
SeriesR-b
1/3
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] Coldify, constify, purify (function attributes)

There's a gcc option -Wsuggest-attribute that, as it says, suggests some function attributes to provide some hints and allowing more optimizations.

Debug build

text data bss dec hex filename

1514058  146768   27496 1688322  19c302 pre/btrfs.ko
1512603  146736   27496 1686835  19bd33 post/btrfs.ko

DELTA: -1455

Release build

text data bss dec hex filename

1079288   17316   14912 1111516  10f5dc pre/btrfs.ko
1078138   17316   14912 1110366  10f15e post/btrfs.ko

DELTA: -1150

David Sterba (3):
btrfs: add __cold attribute to more functions
btrfs: add const function attribute
btrfs: add __pure attribute to functions

 fs/btrfs/async-thread.c | 6 ++----
 fs/btrfs/async-thread.h | 4 ++--
 fs/btrfs/ctree.c        | 2 +-
 fs/btrfs/ctree.h        | 6 +++---
 fs/btrfs/dev-replace.c  | 2 +-
 fs/btrfs/dev-replace.h  | 2 +-
 fs/btrfs/disk-io.c      | 4 ++--
 fs/btrfs/disk-io.h      | 4 ++--
 fs/btrfs/ioctl.c        | 2 +-
 fs/btrfs/space-info.c   | 2 +-
 fs/btrfs/space-info.h   | 2 +-
 fs/btrfs/super.c        | 4 ++--
 fs/btrfs/volumes.c      | 4 ++--
 fs/btrfs/volumes.h      | 2 +-
 14 files changed, 22 insertions(+), 24 deletions(-)
Signature · 1 line
2.23.0