Skip to contentSkip to conversation

btrfs: Remove noinline attribute from wait_for_commit

PATCH In review Nikolay Borisov 2 participants 5 messages Nov 24, 2020 – Nov 25, 2020 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: Remove noinline attribute from wait_for_commit

The function is a plain wrapper that noinline makes no sense.

---
 fs/btrfs/transaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/transaction.c +1 -1
index e5a5c3604a9b..fd4293cf69cf 100644
@@ -829,7 +829,7 @@ btrfs_attach_transaction_barrier(struct btrfs_root *root)
 }
 
 /* wait for a transaction commit to be fully complete */
-static noinline void wait_for_commit(struct btrfs_transaction *commit)
+static void wait_for_commit(struct btrfs_transaction *commit)
 {
 	wait_event(commit->commit_wait, commit->state == TRANS_STATE_COMPLETED);
 }

--
2.25.1

#1 lore raw
Quoted 1 line · Nikolay Borisov

The function is a plain wrapper that noinline makes no sense.

Or it is a way to let the function name appear in a stack trace, which could be useful for debugging or analyzing system state.

#2 lore raw
Quoted 6 lines · David Sterba
Quoted 1 line · Nikolay Borisov

The function is a plain wrapper that noinline makes no sense.

Or it is a way to let the function name appear in a stack trace, which could be useful for debugging or analyzing system state.

Well, this information could generally be derived by having the debug info either in crash or one of the "beautify" scripts. In any case I won't insist.

#3 lore raw
Quoted 6 lines · Nikolay Borisov
Quoted 3 lines · David Sterba
Quoted 1 line · Nikolay Borisov

The function is a plain wrapper that noinline makes no sense.

Quoted 7 lines
Quoted 3 lines

Or it is a way to let the function name appear in a stack trace, which could be useful for debugging or analyzing system state.

Well, this information could generally be derived by having the debug info either in crash or one of the "beautify" scripts. In any case I won't insist.

The way it's used is 'cat /proc/*/stack', without the need of debugging kernels and not in a post-mortem analysis with crash.

#4 lore raw
Quoted 9 lines · David Sterba
Quoted 8 lines · Nikolay Borisov
Quoted 6 lines · David Sterba
Quoted 1 line · Nikolay Borisov

The function is a plain wrapper that noinline makes no sense.

Or it is a way to let the function name appear in a stack trace, which could be useful for debugging or analyzing system state.

Quoted 6 lines
Quoted 3 lines

Well, this information could generally be derived by having the debug info either in crash or one of the "beautify" scripts. In any case I won't insist.

The way it's used is 'cat /proc/*/stack', without the need of debugging kernels and not in a post-mortem analysis with crash.

Actually, there's noinline_for_stack annotation that could make a bit more understandable, but reading the comment it's more about conserving stack space, not making the function visible in stack trace.

There are functions like free_reloc_roots, memcmp_node_keys or cleanup_bitmap_list that do a trivial operations, no chance to block or wait. So these are the obvious cases where we don't want it, there are still many more for long functions that would need closer inspection.