lkml.org 
[lkml]   [2023]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2023-05-17 00:50    [W:0.101 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site