mbox series

[net-next,v2,00/12] Begin upstreaming Homa transport protocol

Message ID 20241111234006.5942-1-ouster@cs.stanford.edu (mailing list archive)
Headers show
Series Begin upstreaming Homa transport protocol | expand

Message

John Ousterhout Nov. 11, 2024, 11:39 p.m. UTC
This patch series begins the process of upstreaming the Homa transport
protocol. Homa is an alternative to TCP for use in datacenter
environments. It provides 10-100x reductions in tail latency for short
messages relative to TCP. Its benefits are greatest for mixed workloads
containing both short and long messages running under high network loads.
Homa is not API-compatible with TCP: it is connectionless and message-
oriented (but still reliable and flow-controlled). Homa's new API not
only contributes to its performance gains, but it also eliminates the
massive amount of connection state required by TCP for highly connected
datacenter workloads.

For more details on Homa, please consult the Homa Wiki:
https://homa-transport.atlassian.net/wiki/spaces/HOMA/overview
The Wiki has pointers to two papers on Homa (one of which describes
this implementation) as well as man pages describing the application
API and other information.

There is also a GitHub repo for Homa:
https://github.com/PlatformLab/HomaModule
The GitHub repo contains a superset of this patch set, including:
* Additional source code that will eventually be upstreamed
* Extensive unit tests (which will also be upstreamed eventually)
* Application-level library functions (which need to go in glibc?)
* Man pages (which need to be upstreamed as well)
* Benchmarking and instrumentation code

For this patch series, Homa has been stripped down to the bare minimum
functionality capable of actually executing remote procedure calls. (about
7500 lines of source code, compared to 15000 in the complete Homa). The
remaining code will be upstreamed in smaller batches once this patch
series has been accepted. Note: the code in this patch series is
functional but its performance is not very interesting (about the same
as TCP).

The patch series is arranged to introduce the major functional components
of Homa. Until the last patch has been applied, the code is inert (it
will not be compiled).

Note: this implementation of Homa supports both IPv4 and IPv6.

John Ousterhout (12):
  net: homa: define user-visible API for Homa
  net: homa: define Homa packet formats
  net: homa: create shared Homa header files
  net: homa: create homa_pool.h and homa_pool.c
  net: homa: create homa_rpc.h and homa_rpc.c
  net: homa: create homa_peer.h and homa_peer.c
  net: homa: create homa_sock.h and homa_sock.c
  net: homa: create homa_incoming.c
  net: homa: create homa_outgoing.c
  net: homa: create homa_timer.c
  net: homa: create homa_plumbing.c homa_utils.c
  net: homa: create Makefile and Kconfig

 MAINTAINERS               |    7 +
 include/uapi/linux/homa.h |  165 ++++++
 net/Kconfig               |    1 +
 net/Makefile              |    1 +
 net/homa/Kconfig          |   19 +
 net/homa/Makefile         |   14 +
 net/homa/homa_impl.h      |  767 ++++++++++++++++++++++++++
 net/homa/homa_incoming.c  | 1076 +++++++++++++++++++++++++++++++++++++
 net/homa/homa_outgoing.c  |  854 +++++++++++++++++++++++++++++
 net/homa/homa_peer.c      |  319 +++++++++++
 net/homa/homa_peer.h      |  234 ++++++++
 net/homa/homa_plumbing.c  |  965 +++++++++++++++++++++++++++++++++
 net/homa/homa_pool.c      |  420 +++++++++++++++
 net/homa/homa_pool.h      |  152 ++++++
 net/homa/homa_rpc.c       |  488 +++++++++++++++++
 net/homa/homa_rpc.h       |  446 +++++++++++++++
 net/homa/homa_sock.c      |  380 +++++++++++++
 net/homa/homa_sock.h      |  426 +++++++++++++++
 net/homa/homa_stub.h      |   80 +++
 net/homa/homa_timer.c     |  156 ++++++
 net/homa/homa_utils.c     |  150 ++++++
 net/homa/homa_wire.h      |  378 +++++++++++++
 22 files changed, 7498 insertions(+)
 create mode 100644 include/uapi/linux/homa.h
 create mode 100644 net/homa/Kconfig
 create mode 100644 net/homa/Makefile
 create mode 100644 net/homa/homa_impl.h
 create mode 100644 net/homa/homa_incoming.c
 create mode 100644 net/homa/homa_outgoing.c
 create mode 100644 net/homa/homa_peer.c
 create mode 100644 net/homa/homa_peer.h
 create mode 100644 net/homa/homa_plumbing.c
 create mode 100644 net/homa/homa_pool.c
 create mode 100644 net/homa/homa_pool.h
 create mode 100644 net/homa/homa_rpc.c
 create mode 100644 net/homa/homa_rpc.h
 create mode 100644 net/homa/homa_sock.c
 create mode 100644 net/homa/homa_sock.h
 create mode 100644 net/homa/homa_stub.h
 create mode 100644 net/homa/homa_timer.c
 create mode 100644 net/homa/homa_utils.c
 create mode 100644 net/homa/homa_wire.h

--
2.34.1

Comments

Joe Damato Nov. 12, 2024, 12:15 a.m. UTC | #1
On Mon, Nov 11, 2024 at 03:39:53PM -0800, John Ousterhout wrote:
> This patch series begins the process of upstreaming the Homa transport
> protocol. Homa is an alternative to TCP for use in datacenter
> environments. It provides 10-100x reductions in tail latency for short
> messages relative to TCP. Its benefits are greatest for mixed workloads
> containing both short and long messages running under high network loads.
> Homa is not API-compatible with TCP: it is connectionless and message-
> oriented (but still reliable and flow-controlled). Homa's new API not
> only contributes to its performance gains, but it also eliminates the
> massive amount of connection state required by TCP for highly connected
> datacenter workloads.

Quick note for future versions:

Consider adding a changelog to the cover letter and to the
individual patches which change from revision to revision to make
it easier for folks to follow along with what changed.

You can find more information about this here:
https://www.kernel.org/doc/html/v6.11/process/submitting-patches.html#respond-to-review-comments

And it might be helpful to take a look at other series on the list
which have multiple revisions [1] to get a sense of how others
typically do this.

[1]: https://lore.kernel.org/netdev/20241030-feature_ptp_netnext-v19-0-94f8aadc9d5c@bootlin.com/
John Ousterhout Nov. 12, 2024, 6:06 a.m. UTC | #2
On Mon, Nov 11, 2024 at 4:15 PM Joe Damato <jdamato@fastly.com> wrote:
>
> Quick note for future versions:
>
> Consider adding a changelog to the cover letter and to the
> individual patches which change from revision to revision to make
> it easier for folks to follow along with what changed.

Oops, sorry for the omission. I'll get this right in v3 and beyond. In
the meantime, here is the changelog for v2:

- Remove sockaddr_in_union declaration from public API in homa.h
- Remove kernel wrapper functions (homa_send, etc.) from homa.h
- Fix many sparse warnings (still more work to do here) and other issues
  uncovered by test robot
- Fix checkpatch.pl issues
- Remove residual code related to unit tests
- Remove references to tt_record from comments
- Make it safe to delete sockets during homa_socktab scans
- Use uintptr_t for portability fo 32-bit platforms
- Use do_div instead of "/" for portability
- Remove homa->busy_usecs and homa->gro_busy_usecs (not needed in
  this stripped down version of Homa)
- Eliminate usage of cpu_khz, use sched_clock instead of get_cycles
- Add missing checks of kmalloc return values
- Remove "inline" qualifier from functions in .c files
- Document that pad fields must be zero
- Use more precise type "uint32_t" rather than "int"
- Remove unneeded #include of linux/version.h

> You can find more information about this here:
> https://www.kernel.org/doc/html/v6.11/process/submitting-patches.html#respond-to-review-comments
>
> And it might be helpful to take a look at other series on the list
> which have multiple revisions [1] to get a sense of how others
> typically do this.
>
> [1]: https://lore.kernel.org/netdev/20241030-feature_ptp_netnext-v19-0-94f8aadc9d5c@bootlin.com/
Jakub Kicinski Nov. 13, 2024, 1:48 a.m. UTC | #3
On Mon, 11 Nov 2024 15:39:53 -0800 John Ousterhout wrote:
> This patch series begins the process of upstreaming the Homa transport
> protocol. Homa is an alternative to TCP for use in datacenter
> environments. It provides 10-100x reductions in tail latency for short
> messages relative to TCP. Its benefits are greatest for mixed workloads
> containing both short and long messages running under high network loads.
> Homa is not API-compatible with TCP: it is connectionless and message-
> oriented (but still reliable and flow-controlled). Homa's new API not
> only contributes to its performance gains, but it also eliminates the
> massive amount of connection state required by TCP for highly connected
> datacenter workloads.

Hi John!

Thanks for pushing forward! I wanted to give you a heads up that we're
operating at 50% maintainer capacity for the next 2 weeks so the
reviews may be more muted than usual. Don't hesitate to post new
versions (typically ~once a week) if you want to address any incoming
feedback and/or the build issues.

HTH
Cong Wang Nov. 13, 2024, 5:07 p.m. UTC | #4
On Mon, Nov 11, 2024 at 03:39:53PM -0800, John Ousterhout wrote:
>  MAINTAINERS               |    7 +
>  include/uapi/linux/homa.h |  165 ++++++
>  net/Kconfig               |    1 +
>  net/Makefile              |    1 +
>  net/homa/Kconfig          |   19 +
>  net/homa/Makefile         |   14 +
>  net/homa/homa_impl.h      |  767 ++++++++++++++++++++++++++
>  net/homa/homa_incoming.c  | 1076 +++++++++++++++++++++++++++++++++++++
>  net/homa/homa_outgoing.c  |  854 +++++++++++++++++++++++++++++
>  net/homa/homa_peer.c      |  319 +++++++++++
>  net/homa/homa_peer.h      |  234 ++++++++
>  net/homa/homa_plumbing.c  |  965 +++++++++++++++++++++++++++++++++
>  net/homa/homa_pool.c      |  420 +++++++++++++++
>  net/homa/homa_pool.h      |  152 ++++++
>  net/homa/homa_rpc.c       |  488 +++++++++++++++++
>  net/homa/homa_rpc.h       |  446 +++++++++++++++
>  net/homa/homa_sock.c      |  380 +++++++++++++
>  net/homa/homa_sock.h      |  426 +++++++++++++++
>  net/homa/homa_stub.h      |   80 +++
>  net/homa/homa_timer.c     |  156 ++++++
>  net/homa/homa_utils.c     |  150 ++++++
>  net/homa/homa_wire.h      |  378 +++++++++++++

Hi John,

Thanks for your efforts to push them upstream!

Just some very high-level comments:

1. Please run scripts/checkpatch.pl to make sure the coding style is
aligned with upstream, since I noticed there are still some C++ style
comments in your patchset.

2. Please consider adding socket diagnostics, see net/ipv4/inet_diag.c.

3. Please consider adding test cases, you can pretty much follow
tools/testing/vsock/vsock_test.c.

Regards,
Cong
John Ousterhout Nov. 13, 2024, 6:18 p.m. UTC | #5
On Tue, Nov 12, 2024 at 5:48 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Mon, 11 Nov 2024 15:39:53 -0800 John Ousterhout wrote:
> > This patch series begins the process of upstreaming the Homa transport
> > protocol. Homa is an alternative to TCP for use in datacenter
> > environments. It provides 10-100x reductions in tail latency for short
> > messages relative to TCP. Its benefits are greatest for mixed workloads
> > containing both short and long messages running under high network loads.
> > Homa is not API-compatible with TCP: it is connectionless and message-
> > oriented (but still reliable and flow-controlled). Homa's new API not
> > only contributes to its performance gains, but it also eliminates the
> > massive amount of connection state required by TCP for highly connected
> > datacenter workloads.
>
> Hi John!
>
> Thanks for pushing forward! I wanted to give you a heads up that we're
> operating at 50% maintainer capacity for the next 2 weeks so the
> reviews may be more muted than usual. Don't hesitate to post new
> versions (typically ~once a week) if you want to address any incoming
> feedback and/or the build issues.

Thanks for letting me know.

-John-