lkml.org 
[lkml]   [2018]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [RFC PATCH 0/3] kernel: add support for 256-bit IO access
    Date
    From: Sent: 21 March 2018 18:16
    > To: Ingo Molnar
    ...
    > All this to do a 32-byte PIO access, with absolutely zero data right
    > now on what the win is?
    >
    > Yes, yes, I can find an Intel white-paper that talks about setting WC
    > and then using xmm and ymm instructions to write a single 64-byte
    > burst over PCIe, and I assume that is where the code and idea came
    > from. But I don't actually see any reason why a burst of 8 regular
    > quad-word bytes wouldn't cause a 64-byte burst write too.

    The big gain is from wide PCIe reads, not writes.
    Writes to uncached locations (without WC) are almost certainly required
    to generate the 'obvious' PCIe TLP, otherwise things are likely to break.

    > So right now this is for _one_ odd rdma controller, with absolutely
    > _zero_ performance numbers, and a very high likelihood that it does
    > not matter in the least.
    >
    > And if there are some atomicity concerns ("we need to guarantee a
    > single atomic access for race conditions with the hardware"), they are
    > probably bogus and misplaced anyway, since
    >
    > (a) we can't guarantee that AVX2 exists in the first place

    Any code would need to be in memcpy_fromio(), not in every driver that
    might benefit.
    Then fallback code can be used if the registers aren't available.

    > (b) we can't guarantee that %ymm register write will show up on any
    > bus as a single write transaction anyway

    Misaligned 8 byte accesses generate a single PCIe TLP.
    I can look at what happens for AVX2 transfers later.
    I've got code that mmap()s PCIe addresses into user space, and can
    look at the TLP (indirectly through tracing on an fpga target).
    Just need to set something up that uses AVX copies.

    > So as far as I can tell, there are basically *zero* upsides, and a lot
    > of potential downsides.

    There are some upsides.
    I'll do a performance measurement for reads.

    David

    \
     
     \ /
      Last update: 2018-03-22 11:35    [W:3.003 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site