From: Muchun Song <muchun.song@linux.dev>
To: Marco Elver <elver@google.com>
Cc: Muchun Song <songmuchun@bytedance.com>,
glider@google.com, dvyukov@google.com,
Andrew Morton <akpm@linux-foundation.org>,
jannh@google.com, sjpark@amazon.de, kasan-dev@googlegroups.com,
Linux Memory Management List <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] mm: kfence: simplify kfence pool initialization
Date: Tue, 28 Mar 2023 20:53:21 +0800 [thread overview]
Message-ID: <D04CBA99-3E17-4749-9144-34B6D9D3208E@linux.dev> (raw)
In-Reply-To: <CANpmjNNXDHZGr_r6aZi1bv5itc5KvGhRNnq_CSQRrmB6Wwx+Dg@mail.gmail.com>
> On Mar 28, 2023, at 20:05, Marco Elver <elver@google.com> wrote:
>
> On Tue, 28 Mar 2023 at 13:55, Marco Elver <elver@google.com> wrote:
>>
>> On Tue, 28 Mar 2023 at 11:58, Muchun Song <songmuchun@bytedance.com> wrote:
>>>
>>> There are three similar loops to initialize kfence pool, we could merge
>>> all of them into one loop to simplify the code and make code more
>>> efficient.
>>>
>>> Signed-off-by: Muchun Song <songmuchun@bytedance.com>
>>
>> Reviewed-by: Marco Elver <elver@google.com>
>>
>>> ---
>>> mm/kfence/core.c | 47 ++++++-----------------------------------------
>>> 1 file changed, 6 insertions(+), 41 deletions(-)
>>>
>>> diff --git a/mm/kfence/core.c b/mm/kfence/core.c
>>> index 7d01a2c76e80..de62a84d4830 100644
>>> --- a/mm/kfence/core.c
>>> +++ b/mm/kfence/core.c
>>> @@ -539,35 +539,10 @@ static void rcu_guarded_free(struct rcu_head *h)
>>> static unsigned long kfence_init_pool(void)
>>> {
>>> unsigned long addr = (unsigned long)__kfence_pool;
>>> - struct page *pages;
>>> int i;
>>>
>>> if (!arch_kfence_init_pool())
>>> return addr;
>>> -
>>> - pages = virt_to_page(__kfence_pool);
>>> -
>>> - /*
>>> - * Set up object pages: they must have PG_slab set, to avoid freeing
>>> - * these as real pages.
>>> - *
>>> - * We also want to avoid inserting kfence_free() in the kfree()
>>> - * fast-path in SLUB, and therefore need to ensure kfree() correctly
>>> - * enters __slab_free() slow-path.
>>> - */
>
> Actually: can you retain this comment somewhere?
Sure, I'll move this to right place.
Thanks.
next prev parent reply other threads:[~2023-03-28 12:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 9:58 [PATCH 0/6] Simplify kfence code Muchun Song
2023-03-28 9:58 ` [PATCH 1/6] mm: kfence: simplify kfence pool initialization Muchun Song
2023-03-28 11:55 ` Marco Elver
2023-03-28 12:05 ` Marco Elver
2023-03-28 12:53 ` Muchun Song [this message]
2023-03-28 9:58 ` [PATCH 2/6] mm: kfence: check kfence pool size at building time Muchun Song
2023-03-28 10:14 ` Marco Elver
2023-03-28 13:03 ` Muchun Song
2023-03-28 9:58 ` [PATCH 3/6] mm: kfence: make kfence_protect_page() void Muchun Song
2023-03-28 10:32 ` Marco Elver
2023-03-28 13:04 ` Muchun Song
2023-03-28 9:58 ` [PATCH 4/6] mm: kfence: remove useless check for CONFIG_KFENCE_NUM_OBJECTS Muchun Song
2023-04-03 8:59 ` Alexander Potapenko
2023-03-28 9:58 ` [PATCH 5/6] mm: kfence: change kfence pool page layout Muchun Song
2023-03-28 12:59 ` Marco Elver
2023-03-28 13:32 ` Muchun Song
2023-03-28 14:12 ` Marco Elver
2023-03-28 9:58 ` [PATCH 6/6] mm: kfence: replace ALIGN_DOWN(x, PAGE_SIZE) with PAGE_ALIGN_DOWN(x) Muchun Song
2023-03-28 11:55 ` Marco Elver
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=D04CBA99-3E17-4749-9144-34B6D9D3208E@linux.dev \
--to=muchun.song@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=jannh@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sjpark@amazon.de \
--cc=songmuchun@bytedance.com \
/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