lkml.org 
[lkml]   [2020]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 01/15] PCI/P2PDMA: Don't sleep in upstream_bridge_distance_warn()
    On Fri, Nov 06, 2020 at 10:00:22AM -0700, Logan Gunthorpe wrote:
    > In order to call this function from a dma_map function, it must not sleep.
    > The only reason it does sleep so to allocate the seqbuf to print
    > which devices are within the ACS path.
    >
    > Switch the kmalloc call to use GFP_NOWAIT and simply not print that
    > message if the buffer fails to be allocated.

    Please pass in the actual gfp_t. Especially from an I/O path
    GFP_NOWAIT is not the right gfp_t anyway, you probably want GFP_ATOMIC
    there. But also for the path where we can sleep we should allow that.

    \
     
     \ /
      Last update: 2020-11-09 10:13    [W:4.060 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site