[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CC86FB2B-DC83-4A74-9C52-1CBE6EF5E502@fb.com>
Date: Wed, 24 Aug 2022 17:06:58 +0000
From: Song Liu <songliubraving@...com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Linux-MM <linux-mm@...ck.org>, lkml <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
X86 ML <x86@...nel.org>, Christoph Hellwig <hch@....de>,
Kernel Team <Kernel-team@...com>,
"Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Dave Hansen <dave.hansen@...el.com>, Song Liu <song@...nel.org>
Subject: Re: [RFC 0/5] vmalloc_exec for modules and BPF programs
Hi Peter,
> On Aug 22, 2022, at 9:56 AM, Song Liu <songliubraving@...com> wrote:
>
>> On Aug 22, 2022, at 9:34 AM, Peter Zijlstra <peterz@...radead.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
Powered by blists - more mailing lists