Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Thomas Haschka via Bugspray Bot <bugbot@kernel.org>
To: linux-mmc@vger.kernel.org, ricky_wu@realtek.com, ulf.hansson@linaro.org
Subject: Re: RTS522A fails with "mmc: error -95 doing runtime resume" on Microsoft Surface Go 2
Date: Fri, 21 Feb 2025 13:40:16 +0000	[thread overview]
Message-ID: <20250221-b218821c12-65606d75b0ee@bugzilla.kernel.org> (raw)
In-Reply-To: <20240922-b218821c0-26591b0a1008@bugzilla.kernel.org>

Thomas Haschka writes via Kernel.org Bugzilla:

I bisected the problem, and it seems come from the blocklayer. 

Before this change the SD cards in my Surface GO 2 behave correctly, afterwards they fail after a couple of minutes usage, especially on card rw intensive tasks. 

The SD card basically stops working correctly after the following commit:

smr /usr/src/linux # git bisect good 
65a558f66c308251e256317957b75d1e643c33c3 is the first bad commit
commit 65a558f66c308251e256317957b75d1e643c33c3
Author: Bart Van Assche <bvanassche@acm.org>
Date:   Fri Jul 21 10:27:30 2023 -0700

    block: Improve performance for BLK_MQ_F_BLOCKING drivers
    
    blk_mq_run_queue() runs the queue asynchronously if BLK_MQ_F_BLOCKING
    has been set. This is suboptimal since running the queue asynchronously
    is slower than running the queue synchronously. This patch modifies
    blk_mq_run_queue() as follows if BLK_MQ_F_BLOCKING has been set:
    - Run the queue synchronously if it is allowed to sleep.
    - Run the queue asynchronously if it is not allowed to sleep.
    Additionally, blk_mq_run_hw_queue(hctx, false) calls are modified into
    blk_mq_run_hw_queue(hctx, hctx->flags & BLK_MQ_F_BLOCKING) if the caller
    may be invoked from atomic context.
    
    The following caller chains have been reviewed:
    
    blk_mq_run_hw_queue(hctx, false)
      blk_mq_get_tag()      /* may sleep, hence the functions it calls may also sleep */
      blk_execute_rq()             /* may sleep */
      blk_mq_run_hw_queues(q, async=false)
        blk_freeze_queue_start()   /* may sleep */
        blk_mq_requeue_work()      /* may sleep */
        scsi_kick_queue()
          scsi_requeue_run_queue() /* may sleep */
          scsi_run_host_queues()
            scsi_ioctl_reset()     /* may sleep */
      blk_mq_insert_requests(hctx, ctx, list, run_queue_async=false)
        blk_mq_dispatch_plug_list(plug, from_sched=false)
          blk_mq_flush_plug_list(plug, from_schedule=false)
            __blk_flush_plug(plug, from_schedule=false)
            blk_add_rq_to_plug()
              blk_mq_submit_bio()  /* may sleep if REQ_NOWAIT has not been set */
      blk_mq_plug_issue_direct()
        blk_mq_flush_plug_list()   /* see above */
      blk_mq_dispatch_plug_list(plug, from_sched=false)
        blk_mq_flush_plug_list()   /* see above */
      blk_mq_try_issue_directly()
        blk_mq_submit_bio()        /* may sleep if REQ_NOWAIT has not been set */
      blk_mq_try_issue_list_directly(hctx, list)
        blk_mq_insert_requests() /* see above */
    
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Ming Lei <ming.lei@redhat.com>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Link: https://lore.kernel.org/r/20230721172731.955724-4-bvanassche@acm.org
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

 block/blk-mq.c          | 16 ++++++++++------
 drivers/scsi/scsi_lib.c |  3 ++-
 2 files changed, 12 insertions(+), 7 deletions(-)

View: https://bugzilla.kernel.org/show_bug.cgi?id=218821#c12
You can reply to this message to join the discussion.
-- 
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)


  parent reply	other threads:[~2025-02-21 13:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22 13:35 RTS522A fails with "mmc: error -95 doing runtime resume" on Microsoft Surface Go 2 Thomas Haschka via Bugspray Bot
2024-09-22 13:35 ` The Linux kernel's regression tracker (Thorsten Leemhuis) via Bugspray Bot
2024-09-22 13:35   ` The Linux kernel's regression tracker (Thorsten Leemhuis) via Bugspray Bot
2024-10-08 14:55     ` Ulf Hansson
2024-09-22 13:35 ` Thomas Haschka via Bugspray Bot
2024-09-22 13:35 ` Thomas Haschka via Bugspray Bot
2024-09-22 13:35 ` Thomas Haschka via Bugspray Bot
2024-09-22 13:35 ` Thomas Haschka via Bugspray Bot
2024-09-24 12:30 ` Thomas Haschka via Bugspray Bot
2024-12-31  9:05 ` Thomas Haschka via Bugspray Bot
2024-12-31  9:05 ` Thomas Haschka via Bugspray Bot
2025-01-02  6:30 ` Adrian Hunter via Bugspray Bot
2025-02-21 13:40 ` Thomas Haschka via Bugspray Bot [this message]
2025-02-21 15:00 ` Thomas Haschka via Bugspray Bot
2025-03-11 12:55 ` Adrian Hunter via Bugspray Bot
2025-03-12 12:45   ` Ulf Hansson
2025-03-13 11:05 ` Thomas Haschka via Bugspray Bot
2025-03-13 13:34   ` Ulf Hansson
2025-03-13 11:05 ` Thomas Haschka via Bugspray Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250221-b218821c12-65606d75b0ee@bugzilla.kernel.org \
    --to=bugbot@kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ricky_wu@realtek.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox