[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67c42f72-4448-4fab-aa5d-c26dd47da74f@lunn.ch>
Date: Wed, 30 Oct 2024 13:54:01 +0100
From: Andrew Lunn <andrew@...n.ch>
To: John Ousterhout <ouster@...stanford.edu>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next 04/12] net: homa: create homa_pool.h and
homa_pool.c
On Tue, Oct 29, 2024 at 09:15:09PM -0700, John Ousterhout wrote:
> On Tue, Oct 29, 2024 at 5:09 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> > > +static inline void set_bpages_needed(struct homa_pool *pool)
> >
> > Generally we say no inline functions in .c files, let the compiler
> > decide. If you have some micro benchmark indicating the compiler is
> > getting it wrong, we will then consider allowing it.
>
> I didn't realize that the compiler will inline automatically; I will
> remove "inline" from all of the .c files.
>
> > It would be good if somebody who knows about the page pool took a look
> > at this code. Could the page pool be used as a basis?
>
> I think this is a different problem from what page pools solve. Rather
> than the application providing a buffer each time it calls recvmsg, it
> provides a large region of memory in its virtual address space in
> advance;
Ah, O.K. Yes, page pool is for kernel memory. However, is the virtual
address space mapped to pages and pinned? Or do you allocate pages
into that VM range as you need them? And then free them once the
application says it has completed? If you are allocating and freeing
pages, the page pool might be useful for these allocations.
Taking a step back here, the kernel already has a number of allocators
and ideally we don't want to add yet another one unless it is really
required. So it would be good to get some reviews from the MM people.
Andrew
Powered by blists - more mailing lists