Re: [PATCH 00/13] mm: jit/text allocator

2023-07-20 Thread Mike Rapoport
On Mon, Jun 05, 2023 at 11:09:34AM +0100, Mark Rutland wrote: > On Mon, Jun 05, 2023 at 12:20:40PM +0300, Mike Rapoport wrote: > > On Fri, Jun 02, 2023 at 10:35:09AM +0100, Mark Rutland wrote: > > > On Thu, Jun 01, 2023 at 02:14:56PM -0400, Kent Overstreet wrote: > > > > On Thu, Jun 01, 2023 at 05:

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-13 Thread Mike Rapoport
On Tue, Jun 13, 2023 at 02:56:14PM -0400, Kent Overstreet wrote: > On Thu, Jun 08, 2023 at 09:41:16PM +0300, Mike Rapoport wrote: > > On Tue, Jun 06, 2023 at 11:21:59AM -0700, Song Liu wrote: > > > On Mon, Jun 5, 2023 at 3:09 AM Mark Rutland wrote: > > > > > > [...] > > > > > > > > > > Can you g

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-13 Thread Kent Overstreet
On Thu, Jun 08, 2023 at 09:41:16PM +0300, Mike Rapoport wrote: > On Tue, Jun 06, 2023 at 11:21:59AM -0700, Song Liu wrote: > > On Mon, Jun 5, 2023 at 3:09 AM Mark Rutland wrote: > > > > [...] > > > > > > > > Can you give more detail on what parameters you need? If the only > > > > > > extra > >

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-12 Thread Mike Rapoport
On Fri, Jun 09, 2023 at 10:02:16AM -0700, Song Liu wrote: > On Thu, Jun 8, 2023 at 11:41 AM Mike Rapoport wrote: > > > > On Tue, Jun 06, 2023 at 11:21:59AM -0700, Song Liu wrote: > > > On Mon, Jun 5, 2023 at 3:09 AM Mark Rutland wrote: > > > > > > [...] > > > > > > > > > > Can you give more detai

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-09 Thread Song Liu
On Thu, Jun 8, 2023 at 11:41 AM Mike Rapoport wrote: > > On Tue, Jun 06, 2023 at 11:21:59AM -0700, Song Liu wrote: > > On Mon, Jun 5, 2023 at 3:09 AM Mark Rutland wrote: > > > > [...] > > > > > > > > Can you give more detail on what parameters you need? If the only > > > > > > extra > > > > > >

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-08 Thread Mike Rapoport
On Tue, Jun 06, 2023 at 11:21:59AM -0700, Song Liu wrote: > On Mon, Jun 5, 2023 at 3:09 AM Mark Rutland wrote: > > [...] > > > > > > Can you give more detail on what parameters you need? If the only > > > > > extra > > > > > parameter is just "does this allocation need to live close to kernel >

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-06 Thread Song Liu
On Mon, Jun 5, 2023 at 3:09 AM Mark Rutland wrote: [...] > > > > Can you give more detail on what parameters you need? If the only extra > > > > parameter is just "does this allocation need to live close to kernel > > > > text", that's not that big of a deal. > > > > > > My thinking was that we

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-06 Thread Mike Rapoport
On Mon, Jun 05, 2023 at 11:09:34AM +0100, Mark Rutland wrote: > On Mon, Jun 05, 2023 at 12:20:40PM +0300, Mike Rapoport wrote: > > On Fri, Jun 02, 2023 at 10:35:09AM +0100, Mark Rutland wrote: > > > > It sill can be achieved with a single jit_alloc_arch_params(), just by > > adding enum jit_type pa

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-05 Thread Kent Overstreet
On Mon, Jun 05, 2023 at 12:20:40PM +0300, Mike Rapoport wrote: > On Fri, Jun 02, 2023 at 10:35:09AM +0100, Mark Rutland wrote: > > On Thu, Jun 01, 2023 at 02:14:56PM -0400, Kent Overstreet wrote: > > > On Thu, Jun 01, 2023 at 05:12:03PM +0100, Mark Rutland wrote: > > > > For a while I have wanted t

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-05 Thread Mark Rutland
On Mon, Jun 05, 2023 at 12:20:40PM +0300, Mike Rapoport wrote: > On Fri, Jun 02, 2023 at 10:35:09AM +0100, Mark Rutland wrote: > > On Thu, Jun 01, 2023 at 02:14:56PM -0400, Kent Overstreet wrote: > > > On Thu, Jun 01, 2023 at 05:12:03PM +0100, Mark Rutland wrote: > > > > For a while I have wanted t

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-05 Thread Mike Rapoport
On Fri, Jun 02, 2023 at 10:35:09AM +0100, Mark Rutland wrote: > On Thu, Jun 01, 2023 at 02:14:56PM -0400, Kent Overstreet wrote: > > On Thu, Jun 01, 2023 at 05:12:03PM +0100, Mark Rutland wrote: > > > For a while I have wanted to give kprobes its own allocator so that it > > > can work > > > even

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-04 Thread Song Liu
On Sun, Jun 4, 2023 at 2:40 PM Kent Overstreet wrote: > > On Sun, Jun 04, 2023 at 02:22:30PM -0700, Song Liu wrote: > > On Sun, Jun 4, 2023 at 11:02 AM Kent Overstreet > > wrote: > > > > > > On Fri, Jun 02, 2023 at 11:20:58AM -0700, Song Liu wrote: > > > > IIUC, arm64 uses VMALLOC address space f

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-04 Thread Kent Overstreet
On Sun, Jun 04, 2023 at 02:22:30PM -0700, Song Liu wrote: > On Sun, Jun 4, 2023 at 11:02 AM Kent Overstreet > wrote: > > > > On Fri, Jun 02, 2023 at 11:20:58AM -0700, Song Liu wrote: > > > IIUC, arm64 uses VMALLOC address space for BPF programs. The reason > > > is each BPF program uses at least 6

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-04 Thread Song Liu
On Sun, Jun 4, 2023 at 11:02 AM Kent Overstreet wrote: > > On Fri, Jun 02, 2023 at 11:20:58AM -0700, Song Liu wrote: > > IIUC, arm64 uses VMALLOC address space for BPF programs. The reason > > is each BPF program uses at least 64kB (one page) out of the 128MB > > address space. Puranjay Mohan (CC'

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-04 Thread Kent Overstreet
On Fri, Jun 02, 2023 at 11:20:58AM -0700, Song Liu wrote: > IIUC, arm64 uses VMALLOC address space for BPF programs. The reason > is each BPF program uses at least 64kB (one page) out of the 128MB > address space. Puranjay Mohan (CC'ed) is working on enabling > bpf_prog_pack for arm64. Once this wo

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-03 Thread Puranjay Mohan
On Fri, Jun 2, 2023 at 8:21 PM Song Liu wrote: > > On Fri, Jun 2, 2023 at 2:35 AM Mark Rutland wrote: > > > > On Thu, Jun 01, 2023 at 02:14:56PM -0400, Kent Overstreet wrote: > > > On Thu, Jun 01, 2023 at 05:12:03PM +0100, Mark Rutland wrote: > > > > For a while I have wanted to give kprobes its

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-02 Thread Song Liu
On Fri, Jun 2, 2023 at 2:35 AM Mark Rutland wrote: > > On Thu, Jun 01, 2023 at 02:14:56PM -0400, Kent Overstreet wrote: > > On Thu, Jun 01, 2023 at 05:12:03PM +0100, Mark Rutland wrote: > > > For a while I have wanted to give kprobes its own allocator so that it > > > can work > > > even with CON

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-02 Thread Mark Rutland
On Thu, Jun 01, 2023 at 02:14:56PM -0400, Kent Overstreet wrote: > On Thu, Jun 01, 2023 at 05:12:03PM +0100, Mark Rutland wrote: > > For a while I have wanted to give kprobes its own allocator so that it can > > work > > even with CONFIG_MODULES=n, and so that it doesn't have to waste VA space in

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-01 Thread Song Liu
On Thu, Jun 1, 2023 at 3:13 AM Mike Rapoport wrote: > > From: "Mike Rapoport (IBM)" > > Hi, > > module_alloc() is used everywhere as a mean to allocate memory for code. > > Beside being semantically wrong, this unnecessarily ties all subsystmes > that need to allocate code, such as ftrace, kprobe

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-01 Thread Kent Overstreet
On Thu, Jun 01, 2023 at 05:12:03PM +0100, Mark Rutland wrote: > For a while I have wanted to give kprobes its own allocator so that it can > work > even with CONFIG_MODULES=n, and so that it doesn't have to waste VA space in > the modules area. > > Given that, I think these should have their own

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-01 Thread Mark Rutland
Hi Mike, On Thu, Jun 01, 2023 at 01:12:44PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > module_alloc() is used everywhere as a mean to allocate memory for code. > > Beside being semantically wrong, this unnecessarily ties all subsystmes > that need to allocate code, s