[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230516155013.5c6ec02a8c9deb1e8fc4af8f@linux-foundation.org>
Date: Tue, 16 May 2023 15:50:13 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: Wander Lairson Costa <wander@...hat.com>,
Oleg Nesterov <oleg@...hat.com>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Brian Cain <bcain@...cinc.com>,
Michael Ellerman <mpe@...erman.id.au>,
Stafford Horne <shorne@...il.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Andrei Vagin <avagin@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Daniel Bristot de Oliveira <bristot@...nel.org>,
Yu Zhao <yuzhao@...gle.com>,
Alexey Gladkov <legion@...nel.org>,
Mike Kravetz <mike.kravetz@...cle.com>,
Yang Shi <shy828301@...il.com>,
open list <linux-kernel@...r.kernel.org>,
Hu Chunyu <chuhu@...hat.com>,
Valentin Schneider <vschneid@...hat.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
Luis Goncalves <lgoncalv@...hat.com>
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@...radead.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
Powered by blists - more mailing lists