netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: John Ousterhout <ouster@cs.stanford.edu>, Andrew Lunn <andrew@lunn.ch>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 04/12] net: homa: create homa_pool.h and homa_pool.c
Date: Mon, 4 Nov 2024 14:12:57 +0100	[thread overview]
Message-ID: <bfb037fb-ee80-4b34-9db3-bd953c24fee8@intel.com> (raw)
In-Reply-To: <CAGXJAmyOAEC+d6aM1VQ=w2EYZXB+s4RwuD6TeDiyWpo1bnGE4w@mail.gmail.com>

On 10/30/24 16:48, John Ousterhout wrote:
> (resending... forgot to cc netdev in the original response)
> 
> On Wed, Oct 30, 2024 at 5:54 AM Andrew Lunn <andrew@lunn.ch> wrote:
> 
>>> 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.
> 
> Homa doesn't allocate or free pages for this: the application mmap's a
> region and passes the virtual address range to Homa. Homa doesn't need
> to pin the pages. This memory is used in a fashion similar to how a
> buffer passed to recvmsg would be used, except that Homa maintains
> access to the region for the lifetime of the associated socket. When
> the application finishes processing an incoming message, it notifies
> Homa so that Homa can reuse the message's buffer space for future
> messages; there's no page allocation or freeing in this process.

nice, and I see the obvious performance gains that this approach yields,
would it be possible to instead of mmap() from user, they will ask Homa
to prealloc? That way it will be harder to unmap prematurely, and easier
to port apps between OSes too.

> 
>> 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.
> 
> I'm happy to do that if you still think it's necessary; how do I do that?
> 
> -John-
> 


  reply	other threads:[~2024-11-04 13:13 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 21:35 [PATCH net-next 00/12] Begin upstreaming Homa transport protocol John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 01/12] net: homa: define user-visible API for Homa John Ousterhout
2024-10-29 21:59   ` Andrew Lunn
2024-10-30  4:06     ` John Ousterhout
2024-10-30 12:41       ` Andrew Lunn
2024-11-01 17:47         ` John Ousterhout
2024-11-01 18:01           ` Andrew Lunn
2024-11-07 21:58   ` Edward Cree
2024-11-08 17:55     ` John Ousterhout
2024-11-08 22:02       ` Edward Cree
2024-11-08 22:32         ` Stephen Hemminger
2024-10-28 21:35 ` [PATCH net-next 02/12] net: homa: define Homa packet formats John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 03/12] net: homa: create shared Homa header files John Ousterhout
2024-10-29  6:47   ` kernel test robot
2024-11-02 19:39     ` John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 04/12] net: homa: create homa_pool.h and homa_pool.c John Ousterhout
2024-10-30  0:09   ` Andrew Lunn
2024-10-30  4:15     ` John Ousterhout
2024-10-30 12:54       ` Andrew Lunn
2024-10-30 15:48         ` John Ousterhout
2024-11-04 13:12           ` Przemek Kitszel [this message]
2024-11-04 23:57             ` John Ousterhout
     [not found]         ` <CAGXJAmyLsx9DPGdhZwPxn0wXjFAFV3dqjhFHpaBLtKZ1mtYBSQ@mail.gmail.com>
     [not found]           ` <16f2e9cc-9b5e-4325-b5c7-fe7fd72600a8@lunn.ch>
2024-10-30 20:13             ` John Ousterhout
2024-10-30 20:17             ` John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 05/12] net: homa: create homa_rpc.h and homa_rpc.c John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 06/12] net: homa: create homa_peer.h and homa_peer.c John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 07/12] net: homa: create homa_sock.h and homa_sock.c John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 08/12] net: homa: create homa_incoming.c John Ousterhout
2024-10-30  1:13   ` Andrew Lunn
2024-10-30  4:51     ` John Ousterhout
2024-10-30 13:06       ` Andrew Lunn
2024-10-30 15:49         ` John Ousterhout
2024-10-30 18:23   ` Eric Dumazet
2024-10-30 18:33     ` John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 09/12] net: homa: create homa_outgoing.c John Ousterhout
2024-10-30  0:42   ` Andrew Lunn
2024-10-30  4:30     ` John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 10/12] net: homa: create homa_timer.c John Ousterhout
2024-10-30 19:02   ` Eric Dumazet
2024-10-31 18:55     ` John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 11/12] net: homa: create homa_plumbing.c homa_utils.c John Ousterhout
2024-10-30  1:03   ` Andrew Lunn
2024-10-28 21:35 ` [PATCH net-next 12/12] net: homa: create Makefile and Kconfig John Ousterhout
2024-10-29 14:00   ` kernel test robot
2024-10-29 14:21   ` kernel test robot
2024-10-29 18:42   ` kernel test robot
2024-10-30  1:09   ` kernel test robot
2024-11-03  0:11     ` John Ousterhout

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=bfb037fb-ee80-4b34-9db3-bd953c24fee8@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=andrew@lunn.ch \
    --cc=netdev@vger.kernel.org \
    --cc=ouster@cs.stanford.edu \
    /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;
as well as URLs for NNTP newsgroup(s).