lkml.org 
[lkml]   [2024]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH net-next 13/15] net/smc: introduce loopback-ism DMB type control


    On 11.01.24 13:00, Wen Gu wrote:
    > This provides a way to {get|set} type of DMB offered by loopback-ism,
    > whether it is physically or virtually contiguous memory.
    >
    > echo 0 > /sys/devices/virtual/smc/loopback-ism/dmb_type # physically
    > echo 1 > /sys/devices/virtual/smc/loopback-ism/dmb_type # virtually
    >
    > The settings take effect after re-activating loopback-ism by:
    >
    > echo 0 > /sys/devices/virtual/smc/loopback-ism/active
    > echo 1 > /sys/devices/virtual/smc/loopback-ism/active
    >
    > After this, the link group and DMBs related to loopback-ism will be
    > flushed and subsequent DMBs created will be of the desired type.
    >
    > The motivation of this control is that physically contiguous DMB has
    > best performance but is usually expensive, while the virtually
    > contiguous DMB is cheap and perform well in most scenarios, but if
    > sndbuf and DMB are merged, virtual DMB will be accessed concurrently
    > in Tx and Rx and there will be a bottleneck caused by lock contention
    > of find_vmap_area when there are many CPUs and CONFIG_HARDENED_USERCOPY
    > is set (see link below). So an option is provided.
    >
    I'm courious about why you say that physically contiguous DMB has best
    performance. Because we saw even a bit better perfomance with the
    virtual one than the performance with the physical one.

    \
     
     \ /
      Last update: 2024-05-27 15:06    [W:4.620 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site