Re: [PATCH v3 1/1] page_frag: Recover from memory pressure

2020-11-18 Thread Jakub Kicinski
On Wed, 18 Nov 2020 13:13:35 -0800 Andrew Morton wrote: > On Wed, 18 Nov 2020 11:46:54 -0800 Jakub Kicinski wrote: > > > > 1. The kernel is under memory pressure and allocation of > > > PAGE_FRAG_CACHE_MAX_ORDER in __page_frag_cache_refill() will fail. > > > Instead, > > > the pfmemalloc page

Re: [PATCH v3 1/1] page_frag: Recover from memory pressure

2020-11-18 Thread Andrew Morton
On Wed, 18 Nov 2020 11:46:54 -0800 Jakub Kicinski wrote: > > 1. The kernel is under memory pressure and allocation of > > PAGE_FRAG_CACHE_MAX_ORDER in __page_frag_cache_refill() will fail. Instead, > > the pfmemalloc page is allocated for page_frag_cache->va. > > > > 2: All skb->data from

Re: [PATCH v3 1/1] page_frag: Recover from memory pressure

2020-11-18 Thread Jakub Kicinski
On Sun, 15 Nov 2020 12:10:29 -0800 Dongli Zhang wrote: > The ethernet driver may allocate skb (and skb->data) via napi_alloc_skb(). > This ends up to page_frag_alloc() to allocate skb->data from > page_frag_cache->va. > > During the memory pressure, page_frag_cache->va may be allocated as >

Re: [PATCH v3 1/1] page_frag: Recover from memory pressure

2020-11-16 Thread Eric Dumazet
On Sun, Nov 15, 2020 at 9:16 PM Dongli Zhang wrote: > > The ethernet driver may allocate skb (and skb->data) via napi_alloc_skb(). > This ends up to page_frag_alloc() to allocate skb->data from > page_frag_cache->va. > > During the memory pressure, page_frag_cache->va may be allocated as >

[PATCH v3 1/1] page_frag: Recover from memory pressure

2020-11-15 Thread Dongli Zhang
The ethernet driver may allocate skb (and skb->data) via napi_alloc_skb(). This ends up to page_frag_alloc() to allocate skb->data from page_frag_cache->va. During the memory pressure, page_frag_cache->va may be allocated as pfmemalloc page. As a result, the skb->pfmemalloc is always true as