diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2021-03-12 11:30:27 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-23 14:57:35 +0100 |
commit | 01085e24ff0ae775e7407a6e40c2156a724ae884 (patch) | |
tree | d00c705efc4360b2e54b23aa2c263f901247819f /include/linux/device.h | |
parent | devtmpfs: fix placement of complete() call (diff) | |
download | linux-dev-01085e24ff0ae775e7407a6e40c2156a724ae884.tar.xz linux-dev-01085e24ff0ae775e7407a6e40c2156a724ae884.zip |
devtmpfs: actually reclaim some init memory
Currently gcc seems to inline devtmpfs_setup() into devtmpfsd(), so
its memory footprint isn't reclaimed as intended. Mark it noinline to
make sure it gets put in .init.text.
While here, setup_done can also be put in .init.data: After complete()
releases the internal spinlock, the completion object is never touched
again by that thread, and the waiting thread doesn't proceed until it
observes ->done while holding that spinlock.
This is now the same pattern as for kthreadd_done in init/main.c:
complete() is done in a __ref function, while the corresponding
wait_for_completion() is in an __init function.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20210312103027.2701413-2-linux@rasmusvillemoes.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
0 files changed, 0 insertions, 0 deletions