Received: by 2002:a05:7208:2202:b0:86:316c:7444 with SMTP id s2csp2380918rbb; Tue, 4 Jun 2024 03:54:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVTvRsczH089bchYXr1uSUyiEAXVHLnKxFb3ZnYO1OzJp9uXjT1U7Rh0kcHhhrXBJY1hRbxtmD7LP7uvwqnUD4HOZQ0Eh+xnFASzbp0rQ== X-Google-Smtp-Source: AGHT+IGUme8rTp4arS+99p1GCcCihRPMdSp1+rVppJtFczwjnQ8cInsmFOca6XwFtA0ZBs4Rznuj X-Received: by 2002:a05:620a:3953:b0:795:1e4d:ba0f with SMTP id af79cd13be357-7951e4dbc1dmr49731085a.65.1717498460390; Tue, 04 Jun 2024 03:54:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717498460; cv=pass; d=google.com; s=arc-20160816; b=ZPlQo8atsTyTqZW9qHzol2klU3u/Kxm78IiHXAD8mhJEfXfGvbGG8Z6OtIkC1cbWLs 4JWgjnvoC1oReEiz2IICI7IfR8iCI9rUtEDjmOg/6kIRwwzoITC7X2weI4EQ0Joz8lZl seMHDAlD5go7B9QcxKnDoW+CNoIM53J2NUcEnvVsTkwI718TWkM5VM37czND0xdnOv77 nQv7h/5eY/1PuQtvX16aSx7HlqnjxWsrWwGs7OVnLr8HxYXseZ+pjtjyLldRVf6lNXfM ZLDCCVgsehitnZoSZZQKGUWSAl05PdqMY7r8oNIVMaYsnROiDUFrPj6E0FyQo3b3wc/L u3fQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=woIW2rG36WjVplYf1XFEiaOd0JQOnrJYxOcJXRhrDbw=; fh=ew7jyCqM6GF1pwNFEgmg47RsMDgJNpmJbeX6O2v30Js=; b=HApgQqotps3IGYkt+xuDfWQJqeb4j87qrIY4YQ8Nulbpx23yYnWgC+uXZdaMJYWQBw fg8aqTAZvfbQHY+vB+7GyBxz9iDPGLZv+OQ1AMczfEBOMxW8zEvY2ZeDeWTfcDpcFj85 lZHQqk/ewqQThl16HL6QBLbfu/D57jDRwOBMcY93XplZ2Q/xx8tD5EKymku21EmqB2ld VTTL24iTPIws2sU0+ARKjLGrpEuwPWO4szz1//0s3zoBS95/zScNhAZE1SEBt5cbA7YS 47fq+CzPMfKfoGfrj3/da36U+BRHiZPFzBf0p5i558741MLHzG73kWpW/gAI5xCkKFgH /yNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XoGCQM1u; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-200473-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200473-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794f3062c5esi59065285a.368.2024.06.04.03.54.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 03:54:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200473-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XoGCQM1u; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-200473-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200473-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B40A81C234C7 for ; Tue, 4 Jun 2024 10:54:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E59CE145A04; Tue, 4 Jun 2024 10:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XoGCQM1u" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 286D3145331 for ; Tue, 4 Jun 2024 10:53:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717498426; cv=none; b=rvpzXFPix+9esvrsRpxk4k78DM3HMviQ2NxaQhhmIOB+WYTOgZmqo3o0c6CfEeBOpcUrL1c+kT7oVMGkceac6H7QoZ0AaYwMOn+PZ0CctdhHi40UNl6SkriHMU19qCb2Oon0RSJX//Kom6RoiziWMA7vNsOY3Ec5pm/YEDySQvs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717498426; c=relaxed/simple; bh=sWJfxrg7DaNSgc2gmCC3cAQqrzVJfSocaCuwhh48x1I=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=JcCwy09KRQnVZVFolBkZALLpV6JxKjSn1dQXFWpfPE++VTk5Nqi04n0bVj+RQtA0gpN7c6qeLD2YytliWsppcMJRt/QlUhfonimmL4g5iMVBZS3DWOkhGZt3dEbZuzdCVShsBKkPHzMcIqu+wMonNlmYm1Aa8+hdqdtXCskI9wg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=XoGCQM1u; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717498422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=woIW2rG36WjVplYf1XFEiaOd0JQOnrJYxOcJXRhrDbw=; b=XoGCQM1uUREZhqrTKNRLKWVMpMs8507DrbhTwSPlwV25zBascauDjOxHZHw5rVU/iIXB7F Fgn88wjHOnmQ5QM2pZDDAkU8XQbCPZIxQa+G9PhajFiIZl0Ysihas57XURxOHTpvHnXvXU /9ULqSruHN6JdMZYEwLOSNOk/dEhwg8= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-168--idcQRBxOsO23WxaJq5bSQ-1; Tue, 04 Jun 2024 06:53:40 -0400 X-MC-Unique: -idcQRBxOsO23WxaJq5bSQ-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2ea940c4061so5141061fa.0 for ; Tue, 04 Jun 2024 03:53:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717498419; x=1718103219; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=woIW2rG36WjVplYf1XFEiaOd0JQOnrJYxOcJXRhrDbw=; b=YzP55F+JOIRvzK9TkEkFatzjr2Yk5p1WYlYImVL4H6+uAOvxhW0GeDAIw3Yol900Xg 49y9X9dFz1pzbXkon4+MjkqhRzCu/Iu1NXQ6fDmN393lQY6IS3mr6JbMdQpX0/xZQ7Zj /qL47z3YDksJe68F2q1iQdAJKFFVMhnRZuxJfafKFhkz03dp0P656wYUha0CHL1Vu3RN NNp36ejY9Oi4Ar4LavXwxBkX9HZQ3k+qIE3xSHERndo4U57KhXDwxIJxyhNXeHbkEWc0 V3L5IVsXGgMfgH8/f5oWy7cJgHZAwMJEDtma+2xcJhQHR9UAshoKJiVxADaZPb1B+3Ul Redw== X-Forwarded-Encrypted: i=1; AJvYcCW5Vfap/R6djRaeXSvJrIaqkMiA8eHQAVwKtVuygEerIejo7fLgpkRDT/WRFsFMKSXehstKy3ZwruO8Da3hQ8ChggBkfIo1ihy1mqSr X-Gm-Message-State: AOJu0YyzPa1Psj+tWVvljBTFmvP3VYk9t03pR4P/Oj8ncdYunKxqQvkf n9LpawYy9iqiXOdtbiclF3spYPI0x0lMM3VWafe6QgeveEqkeBauQmdzXwF05DVwwTUyj1F7yFc Yj9dfkce7hGop62jMU0mvlrJBEqT8S8rji5LIrtDSDfL5NS6VJ30p8GDLxmVUVw== X-Received: by 2002:a2e:8949:0:b0:2ea:9449:7713 with SMTP id 38308e7fff4ca-2ea94f5a049mr64304161fa.0.1717498419102; Tue, 04 Jun 2024 03:53:39 -0700 (PDT) X-Received: by 2002:a2e:8949:0:b0:2ea:9449:7713 with SMTP id 38308e7fff4ca-2ea94f5a049mr64303521fa.0.1717498418643; Tue, 04 Jun 2024 03:53:38 -0700 (PDT) Received: from gerbillo.redhat.com ([2a0d:3344:1b74:3a10::f71]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212b84f8e7sm148788635e9.20.2024.06.04.03.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 03:53:38 -0700 (PDT) Message-ID: <9c302fffa10085760eac3d0c64fa66063be3f407.camel@redhat.com> Subject: Re: [PATCH net-next v10 11/14] tcp: RX path for devmem TCP From: Paolo Abeni To: Mina Almasry , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Donald Hunter , Jonathan Corbet , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Andreas Larsson , Jesper Dangaard Brouer , Ilias Apalodimas , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Arnd Bergmann , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Steffen Klassert , Herbert Xu , David Ahern , Willem de Bruijn , Shuah Khan , Sumit Semwal , Christian =?ISO-8859-1?Q?K=F6nig?= , Pavel Begunkov , David Wei , Jason Gunthorpe , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi , Willem de Bruijn , Kaiyuan Zhang Date: Tue, 04 Jun 2024 12:53:35 +0200 In-Reply-To: <20240530201616.1316526-12-almasrymina@google.com> References: <20240530201616.1316526-1-almasrymina@google.com> <20240530201616.1316526-12-almasrymina@google.com> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0/Pd1pdQEiRuvfM5DUXDo/YOZLV0NfRFU9SmtIPhbdm9cV8Hf8mUwubihiJB/9zPvVq8xfiVbdT0sPzBtxW0fXwrbFxYAOFvT0UC2MjlIsukjmXOUJtdZqBE3v3Jf7VnjNVj9P58+MOx9iYo8jl3fNd7biyQWdPDfYk9ncK8km4skfZQIoUVqrWqGDJjHO1W9CQLAxkfOeHrmG29PK9tHIwARAQABtB9QYW9sbyBBYmVuaSA8cGFiZW5pQHJlZGhhdC5jb20+iQJSBBMBCAA8FiEEg1AjqC77wbdLX2LbKSR5jcyPE6QFAmISiDUCGwMFCwkIBwIDIgIBBhUKCQgLAgQWAgMBAh4HAheAAAoJECkkeY3MjxOkJSYQAJcc6MTsuFxYdYZkeWjW//zbD3ApRHzpNlHLVSuJqHr9/aDS+tyszgS8jj9MiqALzgq4iZbg 7ZxN9ZsDL38qVIuFkSpgMZCiUHdxBC11J8nbBSLlpnc924UAyr5XrGA99 6Wl5I4Km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oJECkkeY3MjxOkY1YQAKdGjHyIdOWSjM8DPLdGJaPgJdugHZowaoyCxffilMGXqc8axBtmYjUIoXurpl+f+a7S0tQhXjGUt09zKlNXxGcebL5TEPFqgJTHN/77ayLslMTtZVYHE2FiIxkvW48yDjZUlefmphGpfpoXe4nRBNto1mMB9Pb9vR47EjNBZCtWWbwJTIEUwHP2Z5fV9nMx9Zw2BhwrfnODnzI8xRWVqk7/5R+FJvl7s3nY4F+svKGD9QHYmxfd8Gx42PZc/qkeCjUORaOf1fsYyChTtJI4iNm6iWbD9HK5LTMzwl0n0lL7CEsBsCJ97i2swm1DQiY1ZJ95G2Nz5PjNRSiymIw9/neTvUT8VJJhzRl3Nb/EmO/qeahfiG7zTpqSn2dEl+AwbcwQrbAhTPzuHIcoLZYV0xDWzAibUnn7pSrQKja+b8kHD9WF+m7dPlRVY7soqEYXylyCOXr5516upH8vVBmqweCIxXSWqPAhQq8d3hB/Ww2A0H0PBTN1REVw8pRLNApEA7C2nX6RW0XmA53PIQvAP0EAakWsqHoKZ5WdpeOcH9iVlUQhRgemQSkhfNaP9LqR1XKujlTuUTpoyT3xwAzkmSxN1nABoutHEO/N87fpIbpbZaIdinF7b9srwUvDOKsywfs5HMiUZhLKoZzCcU/AEFjQsPTATACGsWf3JYPnWxL9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2024-05-30 at 20:16 +0000, Mina Almasry wrote: > @@ -2317,6 +2318,213 @@ static int tcp_inq_hint(struct sock *sk) > return inq; > } > =20 > +/* batch __xa_alloc() calls and reduce xa_lock()/xa_unlock() overhead. *= / > +struct tcp_xa_pool { > + u8 max; /* max <=3D MAX_SKB_FRAGS */ > + u8 idx; /* idx <=3D max */ > + __u32 tokens[MAX_SKB_FRAGS]; > + netmem_ref netmems[MAX_SKB_FRAGS]; > +}; > + > +static void tcp_xa_pool_commit(struct sock *sk, struct tcp_xa_pool *p, > + bool lock) > +{ > + int i; > + > + if (!p->max) > + return; > + if (lock) > + xa_lock_bh(&sk->sk_user_frags); The conditional lock here confuses sparse. I think you can avoid it providing a unlocked version (no need to check for '!p->max' the only caller wanting the unlocked version already performs such check) and a locked one, calling the other. Cheers, Paolo