From nobody Fri Nov 12 17:09:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0D90F184D8AC for ; Fri, 12 Nov 2021 17:09:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x933.google.com (mail-ua1-x933.google.com [IPv6:2607:f8b0:4864:20::933]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HrQ6m2mmYz3sQY for ; Fri, 12 Nov 2021 17:09:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x933.google.com with SMTP id l24so15949288uak.2 for ; Fri, 12 Nov 2021 09:09:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HiR62pvvxuzMROJHZcq0Yz5uJW6Msn8Bl8nVNFKU8M8=; b=xA/eufuQzW5LhMBA3N234xb0Vh/dhh3zTn3rRjN+AcGkkEl9dTj5qevhjNH3R5jKoE wQUNapHc3ZEREkApwPhQPFLRv3NB1WwxBLlx3SEc6buGlzYfeXjanaSlwffUdwZLF+AZ +r5iO45vrOUgwYliM76741OIEUBRnSa09iZYP9fOmGAE+P44FMfQSU4kdb5JfinvnXSm +XR8fcXCOh3gk18nlH1P2JqUagzUjujZemxKUkDWbH54cqMYXSRqAwf583EibEAWYBrz cVJHUH2JQGIoA0PGcvP4IOAt81hvpU1fnBfH2wxWn2NjSVEdME8DKXoSM4GlRh9JAvyQ 4TSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HiR62pvvxuzMROJHZcq0Yz5uJW6Msn8Bl8nVNFKU8M8=; b=u1A6wSLJ9SfFRHGloSAaYRPo0baOvixdvbNLjJNv5OXtSQgpzZse0F33CM0SZaP/lH CMhwWGrIQy5fDL7mLevR37zAih393kcuWCq0phNS/iPFisny3X6GqUN2EG61uzPIFQp8 kYHbuFtbLDfbdqChWbs5/NvbvgZu71Sm+SMx5YQGfncmMsQVVWM0lGA81frvx3sZyuEW j2XmngWVj5vRkUy+AsUSGMd/anmprNUiujqjny/be9VJMjvxLr54vW0C7JQ6ntkAsr/g xKCW0IH3VMknXuBJf4jUeFLLvwMyF3SJlaUWDHzyWYizys6fv2tuhDG6or2T/yD+Zc9c k1Og== X-Gm-Message-State: AOAM532PlN1xInWn735arWnSqAE41CXpLJ8l9X5XVioQ9m90l4Oy95dd r0kpaXzU3/lvVLBMjYpKd5NPRMhPJWqhuU3ctTjbLg== X-Google-Smtp-Source: ABdhPJxYQaDqnsdpUgArAN2TaTHhNVaFqa/2999+9B7SftG33tryzSS4hF6qk2XgY7CkP8znxJgGtEBnF0rSexudza8= X-Received: by 2002:ab0:6f47:: with SMTP id r7mr24349907uat.85.1636736959053; Fri, 12 Nov 2021 09:09:19 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202111111131.1ABBVH6s017371@gitrepo.freebsd.org> <2a564b11-b1f4-a4fe-745b-27f45fb134eb@FreeBSD.org> In-Reply-To: <2a564b11-b1f4-a4fe-745b-27f45fb134eb@FreeBSD.org> From: Warner Losh Date: Fri, 12 Nov 2021 10:09:07 -0700 Message-ID: Subject: Re: git: b8d60729deef - main - tcp: Congestion control cleanup. To: John Baldwin Cc: Jessica Clarke , Randall Stewart , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000009130f05d09a85ea" X-Rspamd-Queue-Id: 4HrQ6m2mmYz3sQY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --00000000000009130f05d09a85ea Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Nov 12, 2021 at 10:01 AM John Baldwin wrote: > On 11/12/21 8:19 AM, Jessica Clarke wrote: > > On 11 Nov 2021, at 11:31, Randall Stewart wrote: > >> > >> The branch main has been updated by rrs: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3Db8d60729deefa0bd13e6a395fcab492= 8e6e10445 > >> > >> commit b8d60729deefa0bd13e6a395fcab4928e6e10445 > >> Author: Randall Stewart > >> AuthorDate: 2021-11-11 11:28:18 +0000 > >> Commit: Randall Stewart > >> CommitDate: 2021-11-11 11:28:18 +0000 > >> > >> tcp: Congestion control cleanup. > >> > >> NOTE: HEADS UP read the note below if your kernel config is not > including GENERIC!! > >> > >> This patch does a bit of cleanup on TCP congestion control modules= . > There were some rather > >> interesting surprises that one could get i.e. where you use a > socket option to change > >> from one CC (say cc_cubic) to another CC (say cc_vegas) and you > could in theory get > >> a memory failure and end up on cc_newreno. This is not what one > would expect. The > >> new code fixes this by requiring a cc_data_sz() function so we can > malloc with M_WAITOK > >> and pass in to the init function preallocated memory. The CC init > is expected in this > >> case *not* to fail but if it does and a module does break the > >> "no fail with memory given" contract we do fall back to the CC tha= t > was in place at the time. > >> > >> This also fixes up a set of common newreno utilities that can be > shared amongst other > >> CC modules instead of the other CC modules reaching into newreno > and executing > >> what they think is a "common and understood" function. Lets put > these functions in > >> cc.c and that way we have a common place that is easily findable b= y > future developers or > >> bug fixers. This also allows newreno to evolve and grow support fo= r > its features i.e. ABE > >> and HYSTART++ without having to dance through hoops for other CC > modules, instead > >> both newreno and the other modules just call into the common > functions if they desire > >> that behavior or roll there own if that makes more sense. > >> > >> Note: This commit changes the kernel configuration!! If you are no= t > using GENERIC in > >> some form you must add a CC module option (one of CC_NEWRENO, > CC_VEGAS, CC_CUBIC, > >> CC_CDG, CC_CHD, CC_DCTCP, CC_HTCP, CC_HD). You can have more than > one defined > >> as well if you desire. Note that if you create a kernel > configuration that does not > >> define a congestion control module and includes INET or INET6 the > kernel compile will > >> break. Also you need to define a default, generic adds 'options > CC_DEFAULT=3D\"newreno\" > >> but you can specify any string that represents the name of the CC > module (same names > >> that show up in the CC module list under net.inet.tcp.cc). If you > fail to add the > >> options CC_DEFAULT in your kernel configuration the kernel build > will also break. > > > > Not doing so breaks tinderbox, as well as configs not hooks up to > > tinderbox. I don=E2=80=99t think this is acceptable. > > We discussed this a bit on IRC, but I think in this case the default CC_* > options belong in DEFAULTS like the default GEOM_PART_* options rather > than in GENERIC. (Though we mostly avoid changing DEFAULTS, this is one > of the rare cases when I think it makes sense.) Handling the default for > CC_DEFAULT does not work in DEFAULTS since you can't later override it, > but that could be handled by simply having the default for CC_DEFAULT liv= e > in the code itself under an #ifndef instead. > > I think Warner is already testing a patchset to make this change. > Yes. my universe is running now. https://reviews.freebsd.org/D32964 is what I'm testing, if people want to follow along at home or help refine it while the first universe is run... Warner --00000000000009130f05d09a85ea--