lkml.org 
[lkml]   [2021]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 037/157] nvme-tcp: fix misuse of __smp_processor_id with preemption enabled
    Date
    From: Sagi Grimberg <sagi@grimberg.me>

    commit bb83337058a7000644cdeffc67361d2473534756 upstream.

    For our pure advisory use-case, we only rely on this call as a hint, so
    fix the warning complaints of using the smp_processor_id variants with
    preemption enabled.

    Fixes: db5ad6b7f8cd ("nvme-tcp: try to send request in queue_rq context")
    Fixes: ada831772188 ("nvme-tcp: Fix warning with CONFIG_DEBUG_PREEMPT")
    Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
    Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
    Tested-by: Yi Zhang <yi.zhang@redhat.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/nvme/host/tcp.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/nvme/host/tcp.c
    +++ b/drivers/nvme/host/tcp.c
    @@ -287,7 +287,7 @@ static inline void nvme_tcp_queue_reques
    * directly, otherwise queue io_work. Also, only do that if we
    * are on the same cpu, so we don't introduce contention.
    */
    - if (queue->io_cpu == __smp_processor_id() &&
    + if (queue->io_cpu == raw_smp_processor_id() &&
    sync && empty && mutex_trylock(&queue->send_mutex)) {
    queue->more_requests = !last;
    nvme_tcp_send_all(queue);

    \
     
     \ /
      Last update: 2021-03-22 13:47    [W:4.253 / U:0.484 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site