Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2555050rwb; Mon, 15 Aug 2022 07:20:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR6OzmGAgA940wiHgsODs6luWqJXeISVNzvqQqmbmxOs4q4F3sQymDbbGxsjVO13DuQBl5TH X-Received: by 2002:a05:6402:51c6:b0:43d:dd3a:196e with SMTP id r6-20020a05640251c600b0043ddd3a196emr14790424edd.213.1660573228248; Mon, 15 Aug 2022 07:20:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660573228; cv=none; d=google.com; s=arc-20160816; b=Ji/q1bfC8l50nJay3d9ZTkRKQu3acerWmIlOytjsWrwbQnYd9LR21b+DiZD57kPL7J 21ndtfUMPRjBzXW1sVKvvJ9s9ar9XLlD8IMDueVMaVNoxc4maPG6opn3New/b+wPuEnM Rj2H4TdMVJxPI4EyBYmeH2kdgIP/q4xrt80xIvqmlQgx4EhJ52T9OxjJhrjaM4zuiXqy 7Bp2Oq+3QDIIaRUKcBg2cgOGIfp0Ut4qTBp/b3Yezd8dlU6M2qXCFS63qxpsyy+L8p5f q1JSlc5mGYEB8En9uH2aMD50pZdx/8MpD4L+HL43/1xJuC9t+k1yBkXxfgnkEO2kF3sJ 09eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=gVwXRsOgJI+Cnx7zqybxmCG71vWgxYHCtyi19HC0Kc8=; b=OcwqoIf1q31KJH7wb96cd+BEP7uCnbxZBoUPi9DJTq8Poec2TdJhgfn9cpAbb/s5qB O6z8+XEEIPqVmdU+ovtr8jh/TimpV4w0BVtAVhqkeMAhD44v4RMQnFxA29MJ45vo6r19 mY9rgISJTxe5P/U8tQBDADRFBFZMqfPhdBPicxWnn3wtqf8/6DeY/nnza7zp+l794lE1 Iy6CVyvlL1pCwbrgDPvfNBN1m4r1XMKzFVFyOEDnvyHkoIRpNEib+wwVqYGQCq8h1gWs XiofJ8XsGfqBxvHZwhYpaRoTgkYtnlsNdjqkSEXwHXddvIWNjJc/7hvEc+SxzoY8zM8W g9dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s28-20020a50d49c000000b0043d73b9ffbfsi8297675edi.417.2022.08.15.07.20.02; Mon, 15 Aug 2022 07:20:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233222AbiHONtX (ORCPT + 99 others); Mon, 15 Aug 2022 09:49:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233153AbiHONtS (ORCPT ); Mon, 15 Aug 2022 09:49:18 -0400 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 106A422BCE; Mon, 15 Aug 2022 06:49:16 -0700 (PDT) Received: by mail-pj1-f48.google.com with SMTP id h21-20020a17090aa89500b001f31a61b91dso14483909pjq.4; Mon, 15 Aug 2022 06:49:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=gVwXRsOgJI+Cnx7zqybxmCG71vWgxYHCtyi19HC0Kc8=; b=ytol3Hc2EN52t7A/I5knS1WwWcfTfPVzAmSBnDvLqPwwWKYHjMNUJz0MuqtSGIC7Ix hLHz93Jr3mSHCkBcSmrgk+NLq/5P9DC9A93EyMfI7QS94mNTSmtWLtuNYZo4kEH3AEY/ MJqSaoWhYTJv2vFlBpGnDUXq4tlAvDCNKdjiepYtAvbEhP2rs2kSVGwbAKoFp/ROflo7 zlxksIaxzJxzCyHSd72+uRhpJ2XSKUZJAzbTB/muQaWoe3Qn5q2A/FSpnGkJkyKCT8sn m5Ba3dV36tCZeZi7xgWDSoq7TfLo5IZR3gjNdRejuCFhSzK1IXtBZRHOP4nSfqO0mdRt 2l2w== X-Gm-Message-State: ACgBeo293AInyIbZJxEWuEAYVFPJIWrzta81loeAUnbQIcb7qO4eB0d4 IefMt1sWm3BlYhVRNZTwpKI= X-Received: by 2002:a17:902:e154:b0:171:4e75:a282 with SMTP id d20-20020a170902e15400b001714e75a282mr17453864pla.90.1660571355461; Mon, 15 Aug 2022 06:49:15 -0700 (PDT) Received: from [192.168.3.217] ([98.51.102.78]) by smtp.gmail.com with ESMTPSA id b12-20020a170903228c00b0016be596c8afsm6957795plh.282.2022.08.15.06.49.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Aug 2022 06:49:14 -0700 (PDT) Message-ID: <40700595-8c83-1b61-ea93-ea9554bfb2db@acm.org> Date: Mon, 15 Aug 2022 06:49:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH v2 2/2] scsi: sd: Rework asynchronous resume support Content-Language: en-US To: Geert Uytterhoeven Cc: "Martin K . Petersen" , Jaegeuk Kim , scsi , Ming Lei , Hannes Reinecke , John Garry , ericspero@icloud.com, jason600.groome@gmail.com, Linux-Renesas , Linux Kernel Mailing List , linux-ide@vger.kernel.org, James Bottomley References: <20220630195703.10155-1-bvanassche@acm.org> <20220630195703.10155-3-bvanassche@acm.org> <506ca1a6-1122-5755-fc74-60f7c7bfbd0d@acm.org> <6f70e742-9d8a-f389-0482-0ba9696bf445@acm.org> <54e20a27-a10b-b77a-e950-1d3398e2e907@acm.org> <084e7c5a-f98d-d61e-de81-83525851ecf9@acm.org> <14ec47f3-f3b8-61c7-2c64-d96d00dd7076@acm.org> From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/15/22 03:13, Geert Uytterhoeven wrote: > Showing all locks held in the system: > 1 lock held by rcu_tasks_kthre/10: > #0: ffff800009575c38 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: > rcu_tasks_one_gp+0x34/0x4c8 > 4 locks held by kworker/0:10/104: > #0: ffff0004c0008738 ((wq_completion)events){+.+.}-{0:0}, at: > process_one_work+0x1f4/0x6a0 > #1: ffff80000a90bde0 > ((work_completion)(&ap->scsi_rescan_task)){+.+.}-{0:0}, at: > process_one_work+0x1f4/0x6a0 > #2: ffff0004c2b6bf60 (&ap->scsi_scan_mutex){+.+.}-{3:3}, at: > ata_scsi_dev_rescan+0x28/0x118 > #3: ffff0004c2902368 (&dev->mutex){....}-{3:3}, at: > scsi_rescan_device+0x28/0x78 > 1 lock held by in:imklog/636: > #0: ffff0004c5ee86e8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x54/0x68 > 1 lock held by hd/1013: > #0: ffff0004c06388b8 (mapping.invalidate_lock#2){.+.+}-{3:3}, at: > page_cache_ra_unbounded+0x64/0x1a8 Thank you for having shared this information. I will take a closer look and see what I can derive from the above information. > I've just tried with a USB storage device on the same platform, > and it can be read fine after s2idle. So it looks like the issue > is related to SATA. Unfortunately the above does not learn us anything new. The code modified by commit 88f1669019bd ("scsi: sd: Rework asynchronous resume support") is only called if sdev->manage_start_stop != 1. Only the SATA code, the Firewire code and the manage_start_stop sysfs attribute store method set that member variable: $ git grep -nH 'manage_start_stop = ' drivers/ata/libata-scsi.c:1083: sdev->manage_start_stop = 1; drivers/firewire/sbp2.c:1521: sdev->manage_start_stop = 1; drivers/scsi/sd.c:240: sdp->manage_start_stop = v; Would it be possible to share the output of the command below? That should reveal which ATA driver is active on the test setup. find /sys -name proc_name | xargs grep -aH . Thanks, Bart.