From patchwork Wed Oct 17 23:39:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10646595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D7E21157A for ; Wed, 17 Oct 2018 23:40:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C40732885F for ; Wed, 17 Oct 2018 23:40:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8AA0287CB; Wed, 17 Oct 2018 23:40:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FA152885F for ; Wed, 17 Oct 2018 23:40:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727193AbeJRHi2 (ORCPT ); Thu, 18 Oct 2018 03:38:28 -0400 Received: from com-out001.mailprotect.be ([83.217.72.83]:33033 "EHLO com-out001.mailprotect.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726706AbeJRHi2 (ORCPT ); Thu, 18 Oct 2018 03:38:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mailprotect.be; s=mail; h=Content-Transfer-Encoding:MIME-Version:Message-Id :Date:Subject:Cc:To:From:reply-to:sender:bcc:in-reply-to:references: content-type; bh=B80Fq4EGZnOa5jpZrD0P9IGYVqKIhdIQRH0/+EIxYZc=; b=ImWB9pzBj9Kp J/q1JU67vM+XB2th/SyGbPa8y2ZISJKeLMBCe00KDORCdMwrbMFHpTKltC2WX5jhm4d2sFGaAtTPv 2bqLgATuN4nMA/ITOvHCa9VZ3g5TV+ONynlif600H1cMpXO6zlqdBRVM8HFbRlacV+Nk9ht2x90ON qbusQw9k6Uq6DcQogWTJ5XDJg9lGAEpE/6JMelqqM0HpHgpN9FQ/TXt76maDlM/rz3joC/JtH2K2A PfOhdhWpMxJwb/lJnhhoRudZ3yk/q7ih3wdBcGKJBRrPrO/4koMxi1yW4F+oVVK2yV2YpMbH57bqA HAPqyAJJuZbK4KMm1kphjw==; Received: from smtp-auth.mailprotect.be ([178.208.39.155]) by com-mpt-out001.mailprotect.be with esmtp (Exim 4.89) (envelope-from ) id 1gCvQI-000Afw-LB; Thu, 18 Oct 2018 01:40:19 +0200 Received: from desktop-bart.svl.corp.google.com (unknown [104.133.8.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mailprotect.be (Postfix) with ESMTPSA id 6D504C06CF; Thu, 18 Oct 2018 01:40:15 +0200 (CEST) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: Greg Kroah-Hartman , linux-scsi@vger.kernel.org, Bart Van Assche Subject: [PATCH v2 0/7] Increase SCSI disk probing concurrency Date: Wed, 17 Oct 2018 16:39:59 -0700 Message-Id: <20181017234006.124251-1-bvanassche@acm.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog MIME-Version: 1.0 X-Originating-IP: 178.208.39.155 X-SpamExperts-Domain: mailprotect.be X-SpamExperts-Username: 178.208.39.128/27 Authentication-Results: mailprotect.be; auth=pass smtp.auth=178.208.39.128/27@mailprotect.be X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.07) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5hNsN5E+Eg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wWvHPw17RyTo/iK8p1aZEnH6DUdQkQGCPt wXjXyPZWpNzWSy/3tDea9a84QNt8xrcOgd7mq705+GIFeYFzkUqu2/Y= X-Report-Abuse-To: spam@com-mpt-mgt001.mailprotect.be Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello Martin, During the 2018 edition of LSF/MM there was a session about increasing SCSI disk probing concurrency. This patch series implements what has been proposed during that session, namely: - Make sure that the driver core is aware of asynchronous SCSI LUN probing. - Avoid unnecessary serialization between sd_probe() and sd_remove() because this could lead to a deadlock. This patch series makes SCSI LUN probing seven times faster for one particular test case. Please consider this patch series for kernel v4.20. Thanks, Bart. Changes compared to v1: - LUNs are now probed concurrently instead of sequentially. - Added several patches that fix bugs discovered while testing v1 of this patch series. - Included performance results in patch 6/7. Bart Van Assche (7): drivers/base: Fix a race condition in the device probing code drivers/base: Verify struct device locking requirements at runtime drivers/base: Probe devices concurrently if requested by the driver drivers/base, __device_release_driver(): Do not wait for asynchronous probing sd: Avoid that hibernation triggers a kernel warning sd: Rely on the driver core for asynchronous probing sd: Inline sd_probe_part2() drivers/base/bus.c | 3 +- drivers/base/dd.c | 76 ++++++++++++++++++++++++- drivers/base/memory.c | 4 ++ drivers/scsi/scsi.c | 14 ----- drivers/scsi/scsi_lib.c | 15 ++--- drivers/scsi/scsi_pm.c | 22 +------- drivers/scsi/scsi_priv.h | 3 - drivers/scsi/sd.c | 110 +++++++++++++++---------------------- include/scsi/scsi_device.h | 1 - 9 files changed, 130 insertions(+), 118 deletions(-)