[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW5a7jB1wsyNiUMM-QuuvLx4omTRgDiywEMDn3NLhnqMzg@mail.gmail.com>
Date: Thu, 18 May 2023 11:54:23 -0700
From: Song Liu <song@...nel.org>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: Mike Rapoport <rppt@...nel.org>, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Rick Edgecombe <rick.p.edgecombe@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Vlastimil Babka <vbabka@...e.cz>, linux-kernel@...r.kernel.org,
x86@...nel.org
Subject: Re: [RFC PATCH 1/5] mm: intorduce __GFP_UNMAPPED and unmapped_alloc()
On Thu, May 18, 2023 at 10:25 AM Kent Overstreet
<kent.overstreet@...ux.dev> wrote:
>
> On Thu, May 18, 2023 at 10:15:59AM -0700, Song Liu wrote:
> > On Thu, May 18, 2023 at 9:58 AM Kent Overstreet
> > <kent.overstreet@...ux.dev> wrote:
> > >
> > > On Thu, May 18, 2023 at 09:33:20AM -0700, Song Liu wrote:
> > > > I am working on patches based on the discussion in [1]. I am planning to
> > > > send v1 for review in a week or so.
> > >
> > > For reference, here's my own (early, but functioning :) slab allocator:
> > >
> > > Look forward to comparing!
> >
> > This looks similar to the bpf_prog_pack allocator we use for BPF at the
> > moment. (search for bpf_prog_pack in kernel/bpf/core.c). I guess we
> > can also use bpf_prog_pack for bcachefs for now.
>
> The code in bpf/core.c does a _lot_, my preference would be to split
> that up and refactor the bpf code to use something generic :)
The code is actually splitted into two parts:
bpf_prog_pack_[alloc|free] vs. bpf_jit_binary_pack_[alloc|free].
The latter has logic just for BPF. But the former can be reused by
other users (maybe with a little refactoring).
Once the vmap_area based solution is committed, we will replace the
former with the new allocator.
Thanks,
Song
Powered by blists - more mailing lists