From: Song Liu <songliubraving@fb.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Linux-MM <linux-mm@kvack.org>,
lkml <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
X86 ML <x86@kernel.org>, Christoph Hellwig <hch@lst.de>,
Kernel Team <Kernel-team@fb.com>,
"Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Dave Hansen <dave.hansen@intel.com>, Song Liu <song@kernel.org>
Subject: Re: [RFC 0/5] vmalloc_exec for modules and BPF programs
Date: Wed, 24 Aug 2022 17:06:58 +0000 [thread overview]
Message-ID: <CC86FB2B-DC83-4A74-9C52-1CBE6EF5E502@fb.com> (raw)
In-Reply-To: <7621DE6E-D71D-45D1-BAFA-46E882451DD9@fb.com>
Hi Peter,
> On Aug 22, 2022, at 9:56 AM, Song Liu <songliubraving@fb.com> wrote:
>
>> On Aug 22, 2022, at 9:34 AM, Peter Zijlstra <peterz@infradead.org> wrote:
>>
>> On Mon, Aug 22, 2022 at 03:46:38PM +0000, Song Liu wrote:
>>> Could you please share your feedback on this?
>>
>> I've looked at it all of 5 minutes, so perhaps I've missed something.
>>
>> However, I'm a little surprised you went with a second tree instead of
>> doing the top-down thing for data. The way you did it makes it hard to
>> have guard pages between text and data.
>
> I didn't realize the importance of the guard pages. But it is not too
> hard to do it with this approach. For each 2MB text page, we can reserve
> 4kB on the beginning and end of it. Would this work?
>
> There are a couple benefits from a second tree:
>
> 1. It allows text allocations to go below PAGE_SIZE granularity, while
> data allocations would still use PAGE_SIZE granularity, which is the
> same as current code.
> 2. Text allocate requires mapping one vm_struct to many vmap_area. Putting
> text allocations in a separate tree make it easier to handle this.
> (Well, I haven't finished this logic yet).
> 3. A separate tree makes it easier to use text tail page,
> [_etext, roundup(_etext, PMD_SIZE)], for modules and BPF programs.
>
> Does this make sense? Do you see other downsides with a second tree?
Did these make sense? Do you have future comments that I would address in
future versions?
Thanks,
Song
next prev parent reply other threads:[~2022-08-24 17:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220818224218.2399791-1-song@kernel.org>
2022-08-22 15:46 ` Song Liu
2022-08-22 16:34 ` Peter Zijlstra
2022-08-22 16:56 ` Song Liu
2022-08-23 5:42 ` Peter Zijlstra
2022-08-23 6:39 ` Christophe Leroy
2022-08-23 6:57 ` Song Liu
2022-08-23 6:55 ` Song Liu
2022-08-24 17:06 ` Song Liu [this message]
[not found] ` <20220818224218.2399791-2-song@kernel.org>
2022-10-06 23:15 ` [RFC 1/5] vmalloc: introduce vmalloc_exec and vfree_exec Luis Chamberlain
2022-10-07 6:39 ` Song Liu
[not found] ` <20220818224218.2399791-4-song@kernel.org>
2022-10-06 23:38 ` [RFC 3/5] modules, x86: use vmalloc_exec for module core Luis Chamberlain
2022-10-07 6:46 ` Song Liu
[not found] ` <20220818224218.2399791-5-song@kernel.org>
2022-10-06 23:44 ` [RFC 4/5] vmalloc_exec: share a huge page with kernel text Luis Chamberlain
2022-10-07 6:53 ` Song Liu
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=CC86FB2B-DC83-4A74-9C52-1CBE6EF5E502@fb.com \
--to=songliubraving@fb.com \
--cc=Kernel-team@fb.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=song@kernel.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®