Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1365848
| From | Wei-Ning Huang <wnhuang@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] mwifiex: add __GFP_REPEAT to skb allocation call |
| Date | 2016-03-29 06:50 +0200 |
| Message-ID | <rhTLj-Yu-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
"single skb allocation failure" happens when system is under heavy
memory pressure. Add __GFP_REPEAT to skb allocation call so kernel
attempts to reclaim pages and retry the allocation.
Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org>
---
drivers/net/wireless/marvell/mwifiex/sdio.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
index b2c839a..c64989c 100644
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
@@ -1124,7 +1124,8 @@ static void mwifiex_deaggr_sdio_pkt(struct mwifiex_adapter *adapter,
break;
}
skb_deaggr = mwifiex_alloc_dma_align_buf(pkt_len,
- GFP_KERNEL | GFP_DMA);
+ GFP_KERNEL | GFP_DMA |
+ __GFP_REPEAT);
if (!skb_deaggr)
break;
skb_put(skb_deaggr, pkt_len);
@@ -1374,7 +1375,8 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
/* copy pkt to deaggr buf */
skb_deaggr = mwifiex_alloc_dma_align_buf(len_arr[pind],
GFP_KERNEL |
- GFP_DMA);
+ GFP_DMA |
+ __GFP_REPEAT);
if (!skb_deaggr) {
mwifiex_dbg(adapter, ERROR, "skb allocation failure\t"
"drop pkt len=%d type=%d\n",
@@ -1416,7 +1418,8 @@ rx_curr_single:
mwifiex_dbg(adapter, INFO, "info: RX: port: %d, rx_len: %d\n",
port, rx_len);
- skb = mwifiex_alloc_dma_align_buf(rx_len, GFP_KERNEL | GFP_DMA);
+ skb = mwifiex_alloc_dma_align_buf(rx_len, GFP_KERNEL | GFP_DMA |
+ __GFP_REPEAT);
if (!skb) {
mwifiex_dbg(adapter, ERROR,
"single skb allocated fail,\t"
@@ -1521,7 +1524,8 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
rx_len = (u16) (rx_blocks * MWIFIEX_SDIO_BLOCK_SIZE);
mwifiex_dbg(adapter, INFO, "info: rx_len = %d\n", rx_len);
- skb = mwifiex_alloc_dma_align_buf(rx_len, GFP_KERNEL | GFP_DMA);
+ skb = mwifiex_alloc_dma_align_buf(rx_len, GFP_KERNEL | GFP_DMA |
+ __GFP_REPEAT);
if (!skb)
return -1;
--
2.8.0.rc3.226.g39d4020
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] mwifiex: add __GFP_REPEAT to skb allocation call Wei-Ning Huang <wnhuang@chromium.org> - 2016-03-29 06:50 +0200
Re: [PATCH] mwifiex: add __GFP_REPEAT to skb allocation call James Cameron <quozl@laptop.org> - 2016-03-29 07:40 +0200
Re: [PATCH] mwifiex: add __GFP_REPEAT to skb allocation call Kalle Valo <kvalo@codeaurora.org> - 2016-03-29 10:40 +0200
Re: [PATCH] mwifiex: add __GFP_REPEAT to skb allocation call Wei-Ning Huang <wnhuang@google.com> - 2016-03-29 11:30 +0200
RE: [PATCH] mwifiex: add __GFP_REPEAT to skb allocation call Amitkumar Karwar <akarwar@marvell.com> - 2016-03-29 13:00 +0200
Re: [PATCH] mwifiex: add __GFP_REPEAT to skb allocation call Eric Dumazet <eric.dumazet@gmail.com> - 2016-03-29 15:00 +0200
csiph-web