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

2021-03-25 Thread Michal Hocko
On Thu 25-03-21 12:47:04, Johannes Weiner wrote: > On Thu, Mar 25, 2021 at 10:02:28AM +0100, Michal Hocko wrote: > > On Wed 24-03-21 15:49:15, Arjun Roy wrote: > > > On Wed, Mar 24, 2021 at 2:24 PM Johannes Weiner > > > wrote: > > > > > > > > On Wed, Mar 24, 2021 at 10:12:46AM +0100, Michal Hocko

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

2021-03-25 Thread Johannes Weiner
On Thu, Mar 25, 2021 at 10:02:28AM +0100, Michal Hocko wrote: > On Wed 24-03-21 15:49:15, Arjun Roy wrote: > > 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: > > > >

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

2021-03-25 Thread Michal Hocko
On Wed 24-03-21 15:49:15, Arjun Roy wrote: > 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: > > > > > > > > >

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

2021-03-24 Thread Michal Hocko
On Wed 24-03-21 13:53:34, Shakeel Butt wrote: [...] > > Given that's the case, the options seem to be: > > 1) Use a page flag - with the downside that they are a severely > > limited resource, > > 2) Use some bits inside page->memcg_data - this I believe Johannes had > > reasons against, and it isn

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

2021-03-24 Thread Johannes Weiner
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 Wed 17-03-21 18:12:55, Johannes Weiner wrote: > > > [...] > > > > Here is an idea of how it could work: > > > > > > > >

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

2021-03-24 Thread Michal Hocko
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 an idea of how it could work: > > > > > > struct page already has > > > > > > struct {/* page_po

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

2021-03-23 Thread Johannes Weiner
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 that wouldn't pass muster afterwards. > > A) An opt-in mechanism, that a driver needs to expli

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

2021-03-23 Thread Michal Hocko
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 */ > /** > * @dma_addr: might require a 64-bit value even o

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

2021-03-17 Thread Andrew Morton
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 memory containing the network > data filled by the network driver is directly mapped into the address > space

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

2021-03-17 Thread Johannes Weiner
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 -0700, Arjun Roy wrote: > > > From: Arjun Roy > > > > > > TCP zerocopy receive is used by high performance network applicat

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

2021-03-16 Thread Jakub Kicinski
On Mon, 15 Mar 2021 23:28:08 -0700 Arjun Roy wrote: > 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: > [...] > > > [...] > [...] > [...] > > > > > > It is du

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

2021-03-16 Thread Johannes Weiner
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. For RX zerocopy, the memory containing the network > data filled by the network driver is directly mapped into the add

[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, these

[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, these