Content-Type: multipart/mixed; boundary="===============7310960338861056156==" MIME-Version: 1.0 From: Mat Martineau To: mptcp at lists.01.org Subject: [MPTCP] Re: [PATCH mptcp-next v3] mptcp: track window announced to peer Date: Fri, 23 Oct 2020 10:26:57 -0700 Message-ID: <88c3a8bf-3986-6d6-c69e-8e0a2467520@linux.intel.com> In-Reply-To: 9f1dde979aa49b9ccfd30c5cc93544c8d4a668ef.camel@redhat.com X-Status: X-Keywords: X-UID: 6424 --===============7310960338861056156== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri, 23 Oct 2020, Paolo Abeni wrote: > On Fri, 2020-10-23 at 13:59 +0200, Florian Westphal wrote: >> Paolo Abeni wrote: >>> On Thu, 2020-10-22 at 17:43 -0700, Mat Martineau wrote: >>>> On Thu, 22 Oct 2020, Florian Westphal wrote: >>>> @@ -1348,7 +1349,6 @@ static int __tcp_transmit_skb(struct sock *sk, s= truct sk_buff *skb, >>>>> } >>>>> } >>>>> >>>>> - tcp_options_write((__be32 *)(th + 1), tp, &opts); >>>>> skb_shinfo(skb)->gso_type =3D sk->sk_gso_type; >>>>> if (likely(!(tcb->tcp_flags & TCPHDR_SYN))) { >>>>> th->window =3D htons(tcp_select_window(sk)); >>>> >>>> These lines of code between the old tcp_options_write() location and t= he >>>> new location were last touched by Eric, doing some cache miss >>>> optimizations. It doesn't seem like populating the TCP options just af= ter >>>> th->window instead of just before should behave similarly with the data >>>> cache - are you concerned about this at all? I made a mistake re-editing my last sentence here - was trying to say it = *does* seem like the cache behavior should be similar. >>> >>> Thank you for the carefully review! >>> >>> commit 51466a7545b73b7ad7bcfb33410d2823ccfaa501 >>> Author: Eric Dumazet >>> Date: Thu Jun 11 09:15:16 2015 -0700 >>> >>> tcp: fill shinfo->gso_type at last moment >>> >>> moves 'skb_shinfo(skb)->gso_type' initialization just after the option >>> write. Looking at the commit message, what actually makes a difference >>> in such commit is moving the mentioned assigment after the last xmit >>> check to avoid touching extra cache lines if not needed - and we >>> preserve that fact. >>> >>> I think the above is sane performace-wise, but I guess Eric could still >>> teach me better ;) >> >> If neither additional hooking nor change in tcp stack is possible only c= hoice > > I'm sorry, I was likely misleading. I mean: the patch looks fine and > safe to me. Perhpas we can try send that upstream as RFC to explicitly > ask for feedback ?!? > Agreed! -- Mat Martineau Intel --===============7310960338861056156==--