From: Andrew Morton <akpm@linux-foundation.org>
To: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Cc: Alistair Popple <apopple@nvidia.com>,
Yang Shi <shy828301@gmail.com>,
Shakeel Butt <shakeelb@google.com>,
Hugh Dickins <hughd@google.com>,
Miaohe Lin <linmiaohe@huawei.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
yuanxzhang@fudan.edu.cn, Xin Tan <tanxin.ctf@gmail.com>,
Will Deacon <will.deacon@arm.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] mm/rmap: Convert from atomic_t to refcount_t on anon_vma->refcount
Date: Tue, 20 Jul 2021 16:01:27 -0700 [thread overview]
Message-ID: <20210720160127.ac5e76d1e03a374b46f25077@linux-foundation.org> (raw)
In-Reply-To: <1626665029-49104-1-git-send-email-xiyuyang19@fudan.edu.cn>
On Mon, 19 Jul 2021 11:23:35 +0800 Xiyu Yang <xiyuyang19@fudan.edu.cn> wrote:
> refcount_t type and corresponding API can protect refcounters from
> accidental underflow and overflow and further use-after-free situations.
Grumble.
For x86_64 defconfig this takes rmap.o text size from 13226 bytes to
13622.
For x86_64 allmodconfig this takes rmap.o text size from 66576 bytes to
67858.
I didn't check which config option is making the bloat so much worse,
but this really is quite bad. We bust a gut to make savings which are
1% the size of this! Is the refcount_t really so much better than a
bare atomic_t that this impact is justified?
Can someone pleeeeeeze take a look at what is happening here and put
the refcount code on a very serious diet?
next prev parent reply other threads:[~2021-07-20 23:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 3:23 [PATCH] mm/rmap: Convert from atomic_t to refcount_t on anon_vma->refcount Xiyu Yang
2021-07-20 23:01 ` Andrew Morton [this message]
2021-08-19 13:21 ` Will Deacon
2021-08-19 14:06 ` Peter Zijlstra
2021-08-19 15:19 ` Peter Zijlstra
2021-08-19 19:09 ` Linus Torvalds
2021-08-20 6:43 ` Peter Zijlstra
2021-08-20 7:33 ` Kees Cook
2021-08-20 8:16 ` Peter Zijlstra
2021-08-20 8:24 ` Will Deacon
2021-08-20 9:03 ` Peter Zijlstra
2021-08-20 17:26 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210720160127.ac5e76d1e03a374b46f25077@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=hughd@google.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shakeelb@google.com \
--cc=shy828301@gmail.com \
--cc=tanxin.ctf@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.com \
--cc=xiyuyang19@fudan.edu.cn \
--cc=yuanxzhang@fudan.edu.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).