Skip to contentSkip to conversation

Reclaiming memory for network interface

DISCUSSION Sujeev Dias 1 participant 1 message Oct 17, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi

Setup: sdm845 connected to external modem over pcie interface

During a data call, we found out we spend more than 25% of cpu for memory ops with io coherency.  That include allocation, freeing, dma mapping, and unmapping.  As we pushing to higher data rate (beyond 7 Gbps), the time we spend in memory operation is significant. So, we're looking into ways we can reclaim this memory.

One of idea we're thinking is:

1. allocate pages

2. Increment reference count of page

3. allocate skb, and assign page into paged data portion

4. Assign cb function to skb->destructor

5. once destructor get called, move the page to a new skb

Sound simple enough, but we couldn't find anyone actually doing this way.  Anything to be concern with above proposal? We see some example of using destructor to do deferred unmap but didn't see any example of re-using the buffer. Also, couldn't find any meaningful discussion about reclaiming memory for network data. Any thoughts on how we should solve this issue?  Any comment is welcome, thanks.

Sincerely

Sujeev

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project