Procházet zdrojové kódy

qcacmn: Re-enable kswapd reclaim during nbuf alloc

Currently in __qdf_nbuf_alloc(), __GFP_KSWAPD_RECLAIM flag is
unset before calling kernel APIs for SKB allocation. Since this
flag is not set, in low memory scenarios, nbuf allocations might
fail resulting in firmware assert.

Re-enable the __GFP_KSWAPD_RECLAIM flag to avoid these failures.
It is safe to re-enable this flag since __qdf_nbuf_alloc() does
not request for order-3 allocations any more.

Change-Id: I2501a751d42277e2f7015b9e712ccdf5ec0ef7f1
CRs-Fixed: 3739812
Manikanta Pubbisetty před 1 rokem
rodič
revize
9cc2e55b8c
1 změnil soubory, kde provedl 1 přidání a 11 odebrání
  1. 1 11
      qdf/linux/src/qdf_nbuf.c

+ 1 - 11
qdf/linux/src/qdf_nbuf.c

@@ -585,18 +585,8 @@ struct sk_buff *__qdf_nbuf_alloc(qdf_device_t osdev, size_t size, int reserve,
 	if (align)
 		size += (align - 1);
 
-	if (in_interrupt() || irqs_disabled() || in_atomic()) {
+	if (in_interrupt() || irqs_disabled() || in_atomic())
 		flags = GFP_ATOMIC;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
-		/*
-		 * Observed that kcompactd burns out CPU to make order-3 page.
-		 *__netdev_alloc_skb has 4k page fallback option just in case of
-		 * failing high order page allocation so we don't need to be
-		 * hard. Make kcompactd rest in piece.
-		 */
-		flags = flags & ~__GFP_KSWAPD_RECLAIM;
-#endif
-	}
 
 	skb =  alloc_skb(size, flags);