Received: by 10.223.164.221 with SMTP id h29csp4793393wrb; Fri, 20 Oct 2017 00:51:31 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SbC9iRQ42tsa99CR/Ms7aCwLlVcnKHH6H4IsppMDRJ8HnGte3P6FHZa01PS1nYbzyngMo3 X-Received: by 10.159.229.130 with SMTP id az2mr3568981plb.113.1508485891055; Fri, 20 Oct 2017 00:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508485891; cv=none; d=google.com; s=arc-20160816; b=Nw9C9UffYUvAwaq+e3T0FyR4mKSG7zChz/oz2F4c2jKC7iTNfd/GYn9N9yq6dbEULB Dxis0HGiI2xh43sZh1iwHygwGi/O0kLaXfmcavEW2dtdB9TbOQsCFnS4sO5YmpWPcACr isxwYnfFp1Wl1H+aB6bOzqUEGDf8XTd+6+JazVCDBslY/I2WNH4KJBENut7F7M/UvGI6 4dCQbrK91o6UKwoLppVRb1O72QUxs+/j4Ookp/IVF6xKCR7v6ERkChN72/KmPbqErcU7 Xea8uPoxH/JzqtgH0jxqKvf5wPu4YlPBT9ob9A/ArPpiXnDeLEaCP9N6r45lPxZ50x4N N0gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=+HWqeq2StS5FR+xxYeynh+CB+9laRdK08diX+gWh9Ak=; b=HgEsd+j2hBxRtOdytS+bAmYeaI81eqFkuY9USq5PYbjrWnscFCYO1D/f5TomDp9d9l qkhdhUz5Ljy60Q65+jm46zO+GE36GcVbYinYsbUz4i2rr8iKFmNKtQTYbvgZovH/9wg9 5SDXa9ZdVsnqffaktHATL7Q3HWXNIc8cF9AQ7HPlfbSh6KtaT4buNcwvUKIM9mkVm9M7 oGTnQoxMnQPr8p4GO4GtGdjvtYdCWnFlbp11hJOCZGqUXXBMq/e/EZKVT5+TEelpKAPx UupV01EyY4eG4VtLis2r7OtuqmI8aLevC5nP8XRwbl1gJFOF4/X5XSG9Hwz0SWDSu89P Jcww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=QW1SNd6J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si413272pfi.80.2017.10.20.00.51.17; Fri, 20 Oct 2017 00:51:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=QW1SNd6J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752554AbdJTHtt (ORCPT + 99 others); Fri, 20 Oct 2017 03:49:49 -0400 Received: from mail-he1eur01on0096.outbound.protection.outlook.com ([104.47.0.96]:18160 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751927AbdJTHsm (ORCPT ); Fri, 20 Oct 2017 03:48:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+HWqeq2StS5FR+xxYeynh+CB+9laRdK08diX+gWh9Ak=; b=QW1SNd6JmJGqBQHEiKHzXSeFha8h1vVxHxN3u6/ThG4vMx8G0TXamqsAN9ayU7ixjrY5Ob+inlXAdNE0bXqxc0/uM9jpyg/dclTvCsjAMlz9oZEoIBbc+PM9SDbEQIvvbi2AurusGh0XA+DRtm+pkU3aFQcX8vxDtKTz/8kq3oI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ptikhomirov@virtuozzo.com; Received: from [172.16.24.163] (195.214.232.6) by DB5PR08MB0967.eurprd08.prod.outlook.com (2603:10a6:0:13::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 20 Oct 2017 07:48:38 +0000 Subject: Re: [PATCH] scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy To: "James E . J . Bottomley" , "Martin K . Petersen" Cc: Christoph Hellwig , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Konstantin Khorenko , devel@openvz.org References: <20170905125424.15412-1-ptikhomirov@virtuozzo.com> From: Pavel Tikhomirov Message-ID: <8b9d9fd4-86f9-6763-8add-60ed44ddf3f8@virtuozzo.com> Date: Fri, 20 Oct 2017 10:48:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170905125424.15412-1-ptikhomirov@virtuozzo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: VI1PR0102CA0029.eurprd01.prod.exchangelabs.com (2603:10a6:802::42) To DB5PR08MB0967.eurprd08.prod.outlook.com (2603:10a6:0:13::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bbef949e-10f3-49da-b704-08d5178ef9ee X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199);SRVR:DB5PR08MB0967; X-Microsoft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cKTZT7OgnLmQkD2M+eIzpXwfNvcFlE5HOEBDtHEucQ38b7BDt///HMLSRhwkz51y3QWDBT2Po8kVtwo5KioS+ONijXiKoXMc4uv/i2IvO6r8vW5rUifNBELXiYDZNLv1c2ufHdqSh6rM+qXCE9axTqAgmrHIdvH+vVyGp6iuq3111a/Z4cmpt1yIT1oNxeOwL5Vg1NnpyRuTxtQK7H7z0YCfq8ccFMHr1NbcHTJ0Uopy1MihWq1opDZcQrIPRLpf+yeFm1j7IYYTcDSsaMO+/t8UapiA4GnDzTXVgxB3QSwc=;4:TXB4Wr/LWVQua3QwypMxDkOLXeCjASbKsiITalY75OpFqRqTmYopNPEPfJWfHwzryiBp8jrXvO9k85YRsYLM3z3B9dFt6UUKkwLel2QfwA8RzrWFGmZgzjWKxGNLMXcTh/x806At9b29Liu7LauDivS++AajT+tzpvxqrGIekp32TJkJg2jijy1IxIiu+8dYrCSnTKHdxfa2xwA2a5PIomCFj9Pf/AQXXvL1860tNMM2S7a6THgmr3Ps2iKCOxKr X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3231020)(3002001)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB5PR08MB0967;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB5PR08MB0967; X-Forefront-PRVS: 0466CA5A45 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(6009001)(346002)(376002)(189002)(199003)(24454002)(110136005)(5660300001)(64126003)(81166006)(77096006)(23676002)(36756003)(31686004)(97736004)(53546010)(68736007)(189998001)(230700001)(107886003)(58126008)(6246003)(2906002)(4326008)(2950100002)(16526018)(25786009)(86362001)(65826007)(478600001)(50466002)(101416001)(16576012)(105586002)(47776003)(65806001)(65956001)(54906003)(53936002)(8936002)(54356999)(316002)(106356001)(50986999)(6486002)(31696002)(229853002)(76176999)(81156014)(3846002)(6666003)(8676002)(6116002)(305945005)(7736002)(83506002)(66066001)(33646002);DIR:OUT;SFP:1102;SCL:1;SRVR:DB5PR08MB0967;H:[172.16.24.163];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjVQUjA4TUIwOTY3OzIzOjZRNS9Jc2VGTkVvaGYyOTB4MHpoNXZzUjBS?= =?utf-8?B?LzRCeU5TMHN2WjE3aWplenFHZUhUcWE1b2paVFBkd21UVEdLZC9JeTZ3amdT?= =?utf-8?B?M3FnRlA5Z3RwQU1YUCtUTVpSdHVkaFRaVjBlbTZRZ05OU0tUTnJtUU9Zbjla?= =?utf-8?B?dVgrYkc2akRJOWs0b1lrdWZlWTUwSnNLS3VVWVVVQms0ZWNiMlFsa2EzRFV2?= =?utf-8?B?Z0VFYThMb1ViNjRuOXRvQzlla3NrRCtub0RCNkJVZkppaUJUT1R3dTFUMFJo?= =?utf-8?B?bXVUcXBVTUJ0TWZZQ3M2YnpNSzQyV2Q3ZWpCejFWTnQ2bURmK3hHWHpWa0Ru?= =?utf-8?B?Q1RhK2tBa3pDTjJ3MXNCMmI3eWJ3T2JSMlFPTmRKenVTa0ZDWWE2cmdNV0hB?= =?utf-8?B?cENPZkc4ampyUHArK2k0RmVkcU9wMk40NENHVCtXOG5xbkkvTGJTOHk4eVdo?= =?utf-8?B?bzk0MWtuSFdaOE9rT0U5a0R1dVJTUEFNUUpFcDRVOCs2Y1RJTFVJbTh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kkhFWhJBRXRtW4JsfBP9oXqnEGXvfOvn8JFHjYwXUCZeH+5O2P0dh90M5Jfv2ELEQ1pEtUI/CtAnghPE=;7:mDNZ0SBDcWmuOB5VxZxpMgb8K1vkjD6OUIffSafNqEvXdeQ7ZWZYGL8nuDRHB0gQIRIxgrd0hJHL3B6oVrA93dtrx8JTs+RGBNy1bmyZcckWLznwigtmEqTJMBzrN7LTqR3JQZcNL3ptthRvm4iruvOy8iJ0jcUbzHof8iz0pNhj3d8Q9YBjssq9JsalMxvVosGIzH01qnfaWsG+u/BvAY1hjtdKUy1ahjlKkKyXI2c= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB5PR08MB0967;20:e4jeYq2MnPzIJ82QrTDuYZPYARRt+967shDXVL5j2Z7vcpo2L6tbY1Cgvgqgo0jseF41NgiTuHRLVcUMz+qGdfV3CCUNAI+HQ4z+3poEmLZpkSqxMraMFQ+oKkZBSTd2Yt22iT3HhFDncpdVmowtcpIguXp8DCVSU6XYY20sVz8= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2017 07:48:38.0321 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB0967 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ping On 09/05/2017 03:54 PM, Pavel Tikhomirov wrote: > We have a problem on several our nodes with scsi EH. Imagine such an > order of execution of two threads: > > CPU1 scsi_eh_scmd_add CPU2 scsi_host_queue_ready > /* shost->host_busy == 1 initialy */ > > if (shost->shost_state == SHOST_RECOVERY) > /* does not get here */ > return 0; > > lock(shost->host_lock); > shost->shost_state = SHOST_RECOVERY; > > busy = shost->host_busy++; > /* host->can_queue == 1 initialy, busy == 1 > * - go to starved label */ > lock(shost->host_lock) /* wait */ > > shost->host_failed++; > /* shost->host_busy == 2, shost->host_failed == 1 */ > call scsi_eh_wakeup(shost) { > if (host_busy == host_failed) { > /* does not get here */ > wake_up_process(shost->ehandler) > } > } > unlock(shost->host_lock) > > /* acquire lock */ > shost->host_busy--; > > Finaly we do not wakeup scsi_error_handler and all other commands > coming will hang as we are in never ending recovery state as there > is no one left to wakeup handler. > > So scsi disc in these host becomes unresponsive and all bio on node > hangs. (We trigger these problem when scsi cmnds to DVD drive timeout.) > > Main idea of the fix is to try to do wake up every time we decrement > host_busy or increment host_failed(the latter is already OK). > > Now the very *last* one of busy threads getting host_lock after > decrementing host_busy will see all write operations on host's > shost_state, host_busy and host_failed completed thanks to implied > memory barriers on spin_lock/unlock, so at the time of busy==failed > we will trigger wakeup in at least one thread. (Thats why putting > recovery and failed checks under lock) > > Signed-off-by: Pavel Tikhomirov > --- > drivers/scsi/scsi_lib.c | 21 +++++++++++++++++---- > 1 file changed, 17 insertions(+), 4 deletions(-) > > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > index f6097b89d5d3..6c99221d60aa 100644 > --- a/drivers/scsi/scsi_lib.c > +++ b/drivers/scsi/scsi_lib.c > @@ -320,12 +320,11 @@ void scsi_device_unbusy(struct scsi_device *sdev) > if (starget->can_queue > 0) > atomic_dec(&starget->target_busy); > > + spin_lock_irqsave(shost->host_lock, flags); > if (unlikely(scsi_host_in_recovery(shost) && > - (shost->host_failed || shost->host_eh_scheduled))) { > - spin_lock_irqsave(shost->host_lock, flags); > + (shost->host_failed || shost->host_eh_scheduled))) > scsi_eh_wakeup(shost); > - spin_unlock_irqrestore(shost->host_lock, flags); > - } > + spin_unlock_irqrestore(shost->host_lock, flags); > > atomic_dec(&sdev->device_busy); > } > @@ -1503,6 +1502,13 @@ static inline int scsi_host_queue_ready(struct request_queue *q, > spin_unlock_irq(shost->host_lock); > out_dec: > atomic_dec(&shost->host_busy); > + > + spin_lock_irq(shost->host_lock); > + if (unlikely(scsi_host_in_recovery(shost) && > + (shost->host_failed || shost->host_eh_scheduled))) > + scsi_eh_wakeup(shost); > + spin_unlock_irq(shost->host_lock); > + > return 0; > } > > @@ -1964,6 +1970,13 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx, > > out_dec_host_busy: > atomic_dec(&shost->host_busy); > + > + spin_lock_irq(shost->host_lock); > + if (unlikely(scsi_host_in_recovery(shost) && > + (shost->host_failed || shost->host_eh_scheduled))) > + scsi_eh_wakeup(shost); > + spin_unlock_irq(shost->host_lock); > + > out_dec_target_busy: > if (scsi_target(sdev)->can_queue > 0) > atomic_dec(&scsi_target(sdev)->target_busy); > -- Best regards, Tikhomirov Pavel Software Developer, Virtuozzo. From 1580310528742409283@xxx Wed Oct 04 07:19:23 +0000 2017 X-GM-THRID: 1577704452897311330 X-Gmail-Labels: Inbox,Category Forums