qcacmn: Not to be hard to make high order page
kcompactd consumes many CPU cycles without being successful to make high-order page. One of the reason is WIFI driver is allocating order-3 page a lot. It shows 46% high-order allocation comes from WIFI driver. Of course, it should be fixed in MM layer but it is never easy stuff to fix in near future. Regardless of MM changes, drivers should do best effort to reduce high-order allocation, too. This patch fixes the problem via not waking kcompactd. Change-Id: I2bc3bf3ec96d32dd1a93c24edf2f590f331c0ed5 CRs-Fixed: 2265578
This commit is contained in:

committed by
nshrivas

parent
c5f0bd188c
commit
ea4a324ce5
@@ -450,8 +450,18 @@ 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 = __netdev_alloc_skb(NULL, size, flags);
|
||||
|
||||
|
Reference in New Issue
Block a user