diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-08-31 04:25:26 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-08-31 04:25:26 -0400 |
| commit | 02b643b643254ec79b5f9aaa143e10be68eabdab (patch) | |
| tree | 57ec83eebab74324465199a3f52f4f7862177ee6 /include/linux/skbuff.h | |
| parent | d1ee8bc195ffedbf91af0245a2406d6ebd2578f8 (diff) | |
| parent | 4c09e0d6ba65507a0ee0ca9abc5335e4f7bd7404 (diff) | |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 22b6d9ca1654..9b88536487e6 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -1602,20 +1602,16 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i, | |||
| 1602 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 1602 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
| 1603 | 1603 | ||
| 1604 | /* | 1604 | /* |
| 1605 | * Propagate page->pfmemalloc to the skb if we can. The problem is | 1605 | * Propagate page pfmemalloc to the skb if we can. The problem is |
| 1606 | * that not all callers have unique ownership of the page. If | 1606 | * that not all callers have unique ownership of the page but rely |
| 1607 | * pfmemalloc is set, we check the mapping as a mapping implies | 1607 | * on page_is_pfmemalloc doing the right thing(tm). |
| 1608 | * page->index is set (index and pfmemalloc share space). | ||
| 1609 | * If it's a valid mapping, we cannot use page->pfmemalloc but we | ||
| 1610 | * do not lose pfmemalloc information as the pages would not be | ||
| 1611 | * allocated using __GFP_MEMALLOC. | ||
| 1612 | */ | 1608 | */ |
| 1613 | frag->page.p = page; | 1609 | frag->page.p = page; |
| 1614 | frag->page_offset = off; | 1610 | frag->page_offset = off; |
| 1615 | skb_frag_size_set(frag, size); | 1611 | skb_frag_size_set(frag, size); |
| 1616 | 1612 | ||
| 1617 | page = compound_head(page); | 1613 | page = compound_head(page); |
| 1618 | if (page->pfmemalloc && !page->mapping) | 1614 | if (page_is_pfmemalloc(page)) |
| 1619 | skb->pfmemalloc = true; | 1615 | skb->pfmemalloc = true; |
| 1620 | } | 1616 | } |
| 1621 | 1617 | ||
| @@ -2263,7 +2259,7 @@ static inline struct page *dev_alloc_page(void) | |||
| 2263 | static inline void skb_propagate_pfmemalloc(struct page *page, | 2259 | static inline void skb_propagate_pfmemalloc(struct page *page, |
| 2264 | struct sk_buff *skb) | 2260 | struct sk_buff *skb) |
| 2265 | { | 2261 | { |
| 2266 | if (page && page->pfmemalloc) | 2262 | if (page_is_pfmemalloc(page)) |
| 2267 | skb->pfmemalloc = true; | 2263 | skb->pfmemalloc = true; |
| 2268 | } | 2264 | } |
| 2269 | 2265 | ||
