Re: [PATCH v2 3/3] rseq: optimise rseq_get_rseq_cs() and clear_rseq_cs()

2021-04-14 Thread Arjun Roy
On Wed, Apr 14, 2021 at 1:25 PM Eric Dumazet wrote: > > On Wed, Apr 14, 2021 at 10:15 PM Arjun Roy wrote: > > > > On Wed, Apr 14, 2021 at 10:35 AM Eric Dumazet wrote: > > > > > > On Wed, Apr 14, 2021 at 7:15 PM Arjun Roy wrote: > > > > >

Re: [PATCH v2 3/3] rseq: optimise rseq_get_rseq_cs() and clear_rseq_cs()

2021-04-14 Thread Arjun Roy
On Wed, Apr 14, 2021 at 10:35 AM Eric Dumazet wrote: > > On Wed, Apr 14, 2021 at 7:15 PM Arjun Roy wrote: > > > > On Wed, Apr 14, 2021 at 9:10 AM Eric Dumazet wrote: > > > > > > On Wed, Apr 14, 2021 at 6:08 PM David Laight > > > wrote: > >

Re: [PATCH v2 3/3] rseq: optimise rseq_get_rseq_cs() and clear_rseq_cs()

2021-04-14 Thread Arjun Roy
On Wed, Apr 14, 2021 at 9:10 AM Eric Dumazet wrote: > > On Wed, Apr 14, 2021 at 6:08 PM David Laight wrote: > > > > From: Eric Dumazet > > > Sent: 14 April 2021 17:00 > > ... > > > > Repeated unsafe_get_user() calls are crying out for an optimisation. > > > > You get something like: > > > >

Re: [PATCH v2 3/3] rseq: optimise rseq_get_rseq_cs() and clear_rseq_cs()

2021-04-13 Thread Arjun Roy
On Tue, Apr 13, 2021 at 2:19 PM David Laight wrote: > > > If we're special-casing 64-bit architectures anyways - unrolling the > > 32B copy_from_user() for struct rseq_cs appears to be roughly 5-10% > > savings on x86-64 when I measured it (well, in a microbenchmark, not > > in rseq_get_rseq_cs()

Re: [PATCH v2 3/3] rseq: optimise rseq_get_rseq_cs() and clear_rseq_cs()

2021-04-13 Thread Arjun Roy
On Tue, Apr 13, 2021 at 11:22 AM Eric Dumazet wrote: > > On Tue, Apr 13, 2021 at 8:00 PM Mathieu Desnoyers > wrote: > > > > > As long as the ifdefs are localized within clearly identified wrappers in > > the > > rseq code I don't mind doing the special-casing there. > > > > The point which

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-24 Thread Arjun Roy
On Wed, Mar 24, 2021 at 2:24 PM Johannes Weiner wrote: > > On Wed, Mar 24, 2021 at 10:12:46AM +0100, Michal Hocko wrote: > > On Tue 23-03-21 11:47:54, Arjun Roy wrote: > > > On Tue, Mar 23, 2021 at 7:34 AM Michal Hocko wrote: > > > > > > > > On

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-24 Thread Arjun Roy
On Wed, Mar 24, 2021 at 11:26 AM Shakeel Butt wrote: > > On Tue, Mar 23, 2021 at 11:42 AM Arjun Roy wrote: > > > [...] > > > > To summarize then, it seems to me that we're on the same page now. > > I'll put together a tentative v3 such that: > > 1. It use

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-24 Thread Arjun Roy
On Wed, Mar 24, 2021 at 2:12 AM Michal Hocko wrote: > > On Tue 23-03-21 11:47:54, Arjun Roy wrote: > > On Tue, Mar 23, 2021 at 7:34 AM Michal Hocko wrote: > > > > > > On Wed 17-03-21 18:12:55, Johannes Weiner wrote: > > > [...] > > > > Here is a

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-23 Thread Arjun Roy
On Tue, Mar 23, 2021 at 7:34 AM Michal Hocko wrote: > > On Wed 17-03-21 18:12:55, Johannes Weiner wrote: > [...] > > Here is an idea of how it could work: > > > > struct page already has > > > > struct {/* page_pool used by netstack */ > > /** > >

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-23 Thread Arjun Roy
On Tue, Mar 23, 2021 at 10:01 AM Johannes Weiner wrote: > > On Mon, Mar 22, 2021 at 02:35:11PM -0700, Arjun Roy wrote: > > To make sure we're on the same page, then, here's a tentative > > mechanism - I'd rather get buy in before spending too much time on > > something t

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-22 Thread Arjun Roy
On Wed, Mar 17, 2021 at 3:12 PM Johannes Weiner wrote: > > On Tue, Mar 16, 2021 at 11:05:11PM -0700, Arjun Roy wrote: > > On Tue, Mar 16, 2021 at 3:27 AM Johannes Weiner wrote: > > > > > > Hello, > > > > > > On Mon, Mar 15, 2021 at 09:16:45PM

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-22 Thread Arjun Roy
On Wed, Mar 17, 2021 at 8:21 PM Andrew Morton wrote: > > On Mon, 15 Mar 2021 18:30:03 -0700 Arjun Roy wrote: > > > From: Arjun Roy > > > > TCP zerocopy receive is used by high performance network applications > > to further scale. For RX zerocopy, the memor

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-17 Thread Arjun Roy
On Tue, Mar 16, 2021 at 3:27 AM Johannes Weiner wrote: > > Hello, > > On Mon, Mar 15, 2021 at 09:16:45PM -0700, Arjun Roy wrote: > > From: Arjun Roy > > > > TCP zerocopy receive is used by high performance network applications > > to further scale. Fo

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-16 Thread Arjun Roy
On Mon, Mar 15, 2021 at 11:22 PM Arjun Roy wrote: > > On Mon, Mar 15, 2021 at 9:29 PM Shakeel Butt wrote: > > > > On Mon, Mar 15, 2021 at 9:20 PM Arjun Roy wrote: > > > > > [...] > > > > > > > > > > Apologies for the spam - loo

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-16 Thread Arjun Roy
On Mon, Mar 15, 2021 at 9:29 PM Shakeel Butt wrote: > > On Mon, Mar 15, 2021 at 9:20 PM Arjun Roy wrote: > > > [...] > > > > > > > Apologies for the spam - looks like I forgot to rebase the first time > > I sent this out. > > > > Actually

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-15 Thread Arjun Roy
On Mon, Mar 15, 2021 at 9:16 PM Arjun Roy wrote: > > From: Arjun Roy > > TCP zerocopy receive is used by high performance network applications > to further scale. For RX zerocopy, the memory containing the network > data filled by the network driver is directly mapped into t

[mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-15 Thread Arjun Roy
From: Arjun Roy TCP zerocopy receive is used by high performance network applications to further scale. For RX zerocopy, the memory containing the network data filled by the network driver is directly mapped into the address space of high performance applications. To keep the TLB cost low

[mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-15 Thread Arjun Roy
From: Arjun Roy TCP zerocopy receive is used by high performance network applications to further scale. For RX zerocopy, the memory containing the network data filled by the network driver is directly mapped into the address space of high performance applications. To keep the TLB cost low

Re: linux-next: manual merge of the bpf-next tree with the net-next tree

2021-02-14 Thread Arjun Roy
On Sun, Feb 14, 2021 at 1:13 PM Stephen Rothwell wrote: > > Hi all, > > On Mon, 25 Jan 2021 11:12:23 +1100 Stephen Rothwell > wrote: > > > > Today's linux-next merge of the bpf-next tree got a conflict in: > > > > net/ipv4/tcp.c > > > > between commit: > > > > 7eeba1706eba ("tcp: Add

Re: linux-next: manual merge of the bpf-next tree with the net-next tree

2021-01-25 Thread Arjun Roy
On Sun, Jan 24, 2021 at 4:12 PM Stephen Rothwell wrote: > > Hi all, > > Today's linux-next merge of the bpf-next tree got a conflict in: > > net/ipv4/tcp.c > > between commit: > > 7eeba1706eba ("tcp: Add receive timestamp support for receive zerocopy.") > > from the net-next tree and commit:

Re: [PATCH] mm: net: memcg accounting for TCP rx zerocopy

2021-01-19 Thread Arjun Roy
> > > > On Tue, Jan 12, 2021 at 04:18:44PM -0800, Shakeel Butt wrote: > > > > > On Tue, Jan 12, 2021 at 4:12 PM Arjun Roy wrote: > > > > > > > > > > > > On Tue, Jan 12, 2021 at 3:48 PM Roman Gushchin wrote: > > > > &

Re: [PATCH] mm: net: memcg accounting for TCP rx zerocopy

2021-01-13 Thread Arjun Roy
On Wed, Jan 13, 2021 at 10:48 AM Roman Gushchin wrote: > > On Tue, Jan 12, 2021 at 04:12:08PM -0800, Arjun Roy wrote: > > On Tue, Jan 12, 2021 at 3:48 PM Roman Gushchin wrote: > > > > > > On Tue, Jan 12, 2021 at 03:36:18PM -0800, Arjun Roy wrote: > > >

Re: [PATCH] mm: net: memcg accounting for TCP rx zerocopy

2021-01-12 Thread Arjun Roy
On Tue, Jan 12, 2021 at 3:48 PM Roman Gushchin wrote: > > On Tue, Jan 12, 2021 at 03:36:18PM -0800, Arjun Roy wrote: > > On Tue, Jan 12, 2021 at 3:31 PM Roman Gushchin wrote: > > > > > > On Tue, Jan 12, 2021 at 01:41:05PM -0800, Shakeel Butt wrote: > > >

Re: [PATCH] mm: net: memcg accounting for TCP rx zerocopy

2021-01-12 Thread Arjun Roy
On Tue, Jan 12, 2021 at 3:31 PM Roman Gushchin wrote: > > On Tue, Jan 12, 2021 at 01:41:05PM -0800, Shakeel Butt wrote: > > From: Arjun Roy > > > > TCP zerocopy receive is used by high performance network applications to > > further scale. For RX zerocopy, the memo

Re: linux-next: manual merge of the net tree with Linus' tree

2020-06-09 Thread Arjun Roy
Ack, and thank you very much for the fix. -Arjun On Tue, Jun 9, 2020 at 4:30 PM Stephen Rothwell wrote: > > Hi all, > > Today's linux-next merge of the net tree got a conflict in: > > net/ipv4/tcp.c > > between commit: > > d8ed45c5dcd4 ("mmap locking API: use coccinelle to convert mmap_sem