1. 11 Aug, 2021 16 commits
  2. 10 Aug, 2021 20 commits
  3. 09 Aug, 2021 4 commits
    • Jakub Kicinski's avatar
      Merge branch 'add-frag-page-support-in-page-pool' · 4ef3960e
      Jakub Kicinski authored
      Yunsheng Lin says:
      
      ====================
      add frag page support in page pool
      
      This patchset adds frag page support in page pool and
      enable skb's page frag recycling based on page pool in
      hns3 drvier.
      ====================
      
      Link: https://lore.kernel.org/r/1628217982-53533-1-git-send-email-linyunsheng@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4ef3960e
    • Yunsheng Lin's avatar
      net: hns3: support skb's frag page recycling based on page pool · 93188e96
      Yunsheng Lin authored
      This patch adds skb's frag page recycling support based on
      the frag page support in page pool.
      
      The performance improves above 10~20% for single thread iperf
      TCP flow with IOMMU disabled when iperf server and irq/NAPI
      have a different CPU.
      
      The performance improves about 135%(14Gbit to 33Gbit) for single
      thread iperf TCP flow when IOMMU is in strict mode and iperf
      server shares the same cpu with irq/NAPI.
      Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      93188e96
    • Yunsheng Lin's avatar
      page_pool: add frag page recycling support in page pool · 53e0961d
      Yunsheng Lin authored
      Currently page pool only support page recycling when there
      is only one user of the page, and the split page reusing
      implemented in the most driver can not use the page pool as
      bing-pong way of reusing requires the multi user support in
      page pool.
      
      Those reusing or recycling has below limitations:
      1. page from page pool can only be used be one user in order
         for the page recycling to happen.
      2. Bing-pong way of reusing in most driver does not support
         multi desc using different part of the same page in order
         to save memory.
      
      So add multi-users support and frag page recycling in page
      pool to overcome the above limitation.
      Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      53e0961d
    • Yunsheng Lin's avatar
      page_pool: add interface to manipulate frag count in page pool · 0e9d2a0a
      Yunsheng Lin authored
      For 32 bit systems with 64 bit dma, dma_addr[1] is used to
      store the upper 32 bit dma addr, those system should be rare
      those days.
      
      For normal system, the dma_addr[1] in 'struct page' is not
      used, so we can reuse dma_addr[1] for storing frag count,
      which means how many frags this page might be splited to.
      
      In order to simplify the page frag support in the page pool,
      the PAGE_POOL_DMA_USE_PP_FRAG_COUNT macro is added to indicate
      the 32 bit systems with 64 bit dma, and the page frag support
      in page pool is disabled for such system.
      
      The newly added page_pool_set_frag_count() is called to reserve
      the maximum frag count before any page frag is passed to the
      user. The page_pool_atomic_sub_frag_count_return() is called
      when user is done with the page frag.
      Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0e9d2a0a