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

2020-11-15 Thread Dongli Zhang
On 11/15/20 4:18 AM, Matthew Wilcox wrote: > On Sat, Nov 14, 2020 at 10:51:06PM -0800, Dongli Zhang wrote: >> +if (nc->pfmemalloc) { > > You missed the unlikely() change that Eric recommended. > Thank you very much. I missed that email. I will send v3. Dongli Zhang

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

2020-11-15 Thread Matthew Wilcox
On Sat, Nov 14, 2020 at 10:51:06PM -0800, Dongli Zhang wrote: > + if (nc->pfmemalloc) { You missed the unlikely() change that Eric recommended.

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

2020-11-14 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 skb->