Messages in this thread Patch in this message | | | Date | Tue, 16 May 2023 15:50:13 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH v9] kernel/fork: beware of __put_task_struct calling context |
| |
On Tue, 16 May 2023 22:41:18 +0100 Matthew Wilcox <willy@infradead.org> wrote:
> > Oh, I missed that put_task_struct() was still inlined. Should it be? > It seems quite large now.
It's not significantly worse because of this patch. In fact, it's unchanged for non-RT kernels.
Possibly put_task_struct() *should* be uninlined, because it made the mistake of using the dang refcount stuff, which never saw a byte which it couldn't consume :(
I mean...
--- a/fs/open.c~a +++ a/fs/open.c @@ -1572,3 +1572,9 @@ int stream_open(struct inode *inode, str } EXPORT_SYMBOL(stream_open); + +#include <linux/refcount.h> +bool foo(refcount_t *r) +{ + return refcount_dec_and_test(r); +} _ is worth
339 bytes of text for an allmodconfig build 67 bytes of text for an allnoconfig build 77 bytes of text for a defconfig build
| |