Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1945084pxb; Thu, 28 Oct 2021 13:06:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvl+nKB7hEIj/2MiWCq2C0XD7ns/ECVYCf7smcSPyT5kGCjNdpRRTd/m15cG59XDV9j+Lg X-Received: by 2002:a17:906:c149:: with SMTP id dp9mr7928482ejc.394.1635451587859; Thu, 28 Oct 2021 13:06:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635451587; cv=none; d=google.com; s=arc-20160816; b=bN5lzEjyMYiHma+82lfHRx0FNRUHfhjifj7yTI4leyaqAmLxg4BmY8aAdCDvkp24ap Ya7IOB++Xg9+0mLnTlcQyjPaROrPpBImPy7rRgG4OzRAR1AxW2KROKbDCZO0Gv5M2UFv cs40GTUh9nl8f7+gyn65rUuWZ9NjQS7oZLFLk0Fjg6+x58ivnp/xmegYVGOCkiDZuS79 oRtugrJPvOJSFYfuw7G4CpRlT7XSQDhc/kljL5Nnafh5NrdjJ4eVd3RMx2EPuhCA+S6v Tu1Km8fxDscfXTQ37WUdGheALa1879Fynik1UBfe4zqLKPh5lcWReh/4evFMdF0xCAWP vRdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=1K+bk6NacZ1m1XKXaDe80atm4JTwmJpcwCVGp6y32I4=; b=n69oEKn3RyDUMIZaTLzvfRe+E6PDvy/0PN0zMUKAZExmdb4tKTtVIssrDIqZbFU1bF vcGDDNUPLtkldYcXTTGVgBTa6axxHykSFdunJ9A/uNx7dFROvUzOdk7QsZmAtJ62CAN0 FNP2Pv2ZcZOr8lakVoI1L4PsadzxtejuXrdV0TODa6xGvQZ4t6fnbxO6fAgnxWlx3rlm xdsAZhlUkjKwNhPXX8u77aTJL9vb4w9a1/VLkusoAOwADrmWSWqW6XmhKQDkYE19fOrz zFEsqVlc6/CyGqPNxfDZvwOBj0IHZy+1Z95Tzj6jp1CmWc3X8U/nwc06rDzkjdTlNtLo GTcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ho37si5851115ejc.54.2021.10.28.13.06.00; Thu, 28 Oct 2021 13:06:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230460AbhJ1UGg (ORCPT + 99 others); Thu, 28 Oct 2021 16:06:36 -0400 Received: from mail-pf1-f177.google.com ([209.85.210.177]:40617 "EHLO mail-pf1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230104AbhJ1UGg (ORCPT ); Thu, 28 Oct 2021 16:06:36 -0400 Received: by mail-pf1-f177.google.com with SMTP id x7so1998396pfh.7; Thu, 28 Oct 2021 13:04:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1K+bk6NacZ1m1XKXaDe80atm4JTwmJpcwCVGp6y32I4=; b=rx9xYVF0yGR5g28Zy3FU3SF0zPOc/erGhxw4DAEQCaXHvvW7JHwSSThpMDfIV3R6Y/ 5bBEiQ+tHQIZuaq2UFqsBo+Ng67AzxsSdSzUR4wdxsIC9ZZPyNNFqPSez/e0EsI4yQoF fDPULlC3Kn6irRytNi+KCTBH+ITTYk/1wBjIJRZ7byrxVueRVCM/nY17XtChddhGp4YJ Fsj4KpkW1K2Jz9iuBXmUDI77/+NEWxX6szmYLi+QIMUWNn3W9U1C2Xl+S8SxmHqCa4Gw FYqyE0Kiz9Rc/pdjTEXPoLXY+0zo7EvHEmod3rqBJACFSzVp1elAh1TjRqETJovRsSeZ lveA== X-Gm-Message-State: AOAM530Vgdu8wRE055AIrFFFLmB+4j9t+t4RTMPWIipnlHPA9BL4L+3y 6HvwdsnHzh6cQeAND1s5p1g= X-Received: by 2002:a63:4c17:: with SMTP id z23mr877638pga.198.1635451448500; Thu, 28 Oct 2021 13:04:08 -0700 (PDT) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:e816:bd0d:426c:f959]) by smtp.gmail.com with ESMTPSA id s18sm4540439pfk.160.2021.10.28.13.04.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Oct 2021 13:04:07 -0700 (PDT) Subject: Re: [PATCH] scsi: ufs: Fix proper API to send HPB pre-request To: jejb@linux.ibm.com, daejun7.park@samsung.com, ALIM AKHTAR , "avri.altman@wdc.com" , "martin.petersen@oracle.com" , "huobean@gmail.com" , Keoseong Park Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , Jens Axboe , Christoph Hellwig , Jaegeuk Kim References: <20211027223619epcms2p60bbc74c9ba9757c58709a99acd0892ff@epcms2p6> <0f9229c3c4c7859524411a47db96a3b53ac89c90.camel@linux.ibm.com> <0d66b6d0-26c6-573f-e2a0-022e22c47b52@acm.org> <1d7c1faf6b6fa71599b5157ae95fc48ce479b722.camel@linux.ibm.com> From: Bart Van Assche Message-ID: <42ca5f60-4c57-ade1-5fb7-be935ac4ccce@acm.org> Date: Thu, 28 Oct 2021 13:04:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <1d7c1faf6b6fa71599b5157ae95fc48ce479b722.camel@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/28/21 12:12 PM, James Bottomley wrote: > I think the deadlock is triggered if the system is down to its last > reserved request on the memory clearing device and the next entry in > the queue for this device is one which does a fanout so we can't > service it with the single reserved request we have left for the > purposes of making forward progress. Sending it back doesn't help, > assuming this is the only memory clearing path, because retrying it > won't help ... we have to succeed with a request on this path to move > forward with clearing memory. > > I think this problem could be solved by processing the WRITE BUFFER and > the request serially by hijacking the request sent down, but we can't > solve it if we try to allocate a new request. Hi James, How about fixing the abuse of blk_insert_cloned_request() in the UFS HPB before the v5.16 SCSI pull request is sent to Linus and implementing the proposal from your email at a later time? I'm proposing to defer further UFS HPB rework since the issue described above only affects UFS HPB users and does not obstruct maintenance or refactoring of the block layer core. Thanks, Bart.