Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1535348ybv; Fri, 14 Feb 2020 01:23:36 -0800 (PST) X-Google-Smtp-Source: APXvYqyS3Y6C+2ZOuj3P+rjem+bFP0AfatjBxCynsK3oNwfGuZljcfUVTlImM7Cb8JfanwSllBGI X-Received: by 2002:a05:6830:194:: with SMTP id q20mr1580144ota.92.1581672216680; Fri, 14 Feb 2020 01:23:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581672216; cv=none; d=google.com; s=arc-20160816; b=pJydxf06+bKKGPgbtldEYMV8m33QSMvuHw1NkmW2G7KS0ZobYT3BAkRipeAgME2hgm ts5TAssVNxXTYsqeUqWshdnqCvF7W+eDIZzDJWHsS5V5vjXa12MmAND5Ws/uGPK4PFuY EZ0GaPGQXL6U/FyFeZYvWyiVAhaol/teX95mmO9AYEHsdbLpttUwK8VlGS3VS/B5FUhe VbvUDlKxAY8HvUZWXQ/NbOgyQvx6HExSBSHVjeNA6gCtNxO/U/4/EOYs4Si4LhBCok8Q eOPOyMtCamR45vhOe4WdeGT1m3N15GVlz7nSpETS0RoH4JAKQoGSQ1MnWtltiTHZhklM YaSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=HSsfBY73FO1UU5jzBVaE+iGEtOR0A4j37n3sHs5sps4=; b=kKYYz+tDf/TdOTeuuSYbXbgdPrEfeduw33hiu460syjgIWqHlLRTHU5Z3WQ0SwfpPV X4PHfoUooUnruiQHECDNzNVBfwAb91CnMmrfUi9RvYTIiVh/iN2yoJeThdGMrvSvmSzR U89JK15CxHMP+/GGRYP47Wt3N9gf8HfgPWs3iV+fS5yZnyfLScnqWaANUfOY26ym13y/ Vnk5UuxjnlNTkJ5TQSJ1fvNeFpG5ktohTo0cQiO6Ug2hMzI1tazqJxqxbvTRgJojdbSY 10tIr/7M0qUgUCwqtS/LSgDgaKKN71mgcfwKjH9FT3BryRgKt/s/UraXfFSCZqq2Yi8u Pt1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uDZxTrRp; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si2541864oto.205.2020.02.14.01.23.20; Fri, 14 Feb 2020 01:23:36 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=uDZxTrRp; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729028AbgBNJXL (ORCPT + 99 others); Fri, 14 Feb 2020 04:23:11 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:38043 "EHLO mail-wr1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728890AbgBNJXL (ORCPT ); Fri, 14 Feb 2020 04:23:11 -0500 Received: by mail-wr1-f53.google.com with SMTP id y17so10054433wrh.5; Fri, 14 Feb 2020 01:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HSsfBY73FO1UU5jzBVaE+iGEtOR0A4j37n3sHs5sps4=; b=uDZxTrRpXta3sKqqut6QK4COszMH5GkzhZtwp1xtigiRMsqMsLeWtR2By294F3MxR4 fWNe2MZUcQTO4apSXNIJz8K7xh4RaqtXf03mlxfFXRVD4xbi4dz6eyEOH9D9WououKCw xZHnzEZ+7DXjUy5rTPZWybSYulgBhsW73ooGaC24Zx56Husw4PSUeNgCcGdgi/FMfvav y71r5kubDkJ6gI34zb9fRaCtPgDfcsQaBhSrCe1WErIeiXDXBM1EwW4ZdvGfXGpTqYZm 7eHSENHGLBsXMcXoD4YzdhuOKvJUXn9IXepoM3vdArjgXCBi6QmulnkBpHHjKGrafFqE l5bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HSsfBY73FO1UU5jzBVaE+iGEtOR0A4j37n3sHs5sps4=; b=YIRPl4Wn11gr7U6A5RBideUQ830Fe2ZujBbcYnWTOSoEs1JkG904um2uNbXVMNLuol eUIfQ2U1moys7u32tUEi1w6MC70jOkGpwAOI9W3uEma70y6ptrX4bsceVuUgnb2asbCu 8XsNX1jO5kTvcHOLXxjBfrtcXdkyTQ7FnZI5wp1g65vVuVp3EilkwWFaOvYLkZ1ATLSP xCy9drXzBMmbrHHotoFV01Sse7LYVmJyLDKIqKy3Nc1pqcDWhF2wzanBkQMnHlGCz1ce 4s5w2jrHBCVkxwzkpprH4mc45jaGGwa6XxNzufYO/yTcY1FHFwCH0DL2lsrfTHM5cpFX E4XA== X-Gm-Message-State: APjAAAXTbYZQrB35QU6ex7KxxvK8pPRXNi73FtRb6cmAxgdUNrIlUyN3 v8U0Acawfn8Pu6eKHFlhqMaTLHA4iooCpybA6C10A+ZRuLA= X-Received: by 2002:adf:ec4c:: with SMTP id w12mr3139782wrn.124.1581672189119; Fri, 14 Feb 2020 01:23:09 -0800 (PST) MIME-Version: 1.0 References: <20200213082643.GB9144@ming.t460p> In-Reply-To: From: Ming Lei Date: Fri, 14 Feb 2020 17:22:57 +0800 Message-ID: Subject: Re: BLKSECDISCARD ioctl and hung tasks To: Bart Van Assche Cc: Salman Qazi , Ming Lei , Jens Axboe , Christoph Hellwig , Linux Kernel Mailing List , linux-block , Gwendal Grignou , Jesse Barnes Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 14, 2020 at 1:50 PM Bart Van Assche wrote: > > On 2020-02-13 11:21, Salman Qazi wrote: > > AFAICT, This is not actually sufficient, because the issuer of the bio > > is waiting for the entire bio, regardless of how it is split later. > > But, also there isn't a good mapping between the size of the secure > > discard and how long it will take. If given the geometry of a flash > > device, it is not hard to construct a scenario where a relatively > > small secure discard (few thousand sectors) will take a very long time > > (multiple seconds). > > > > Having said that, I don't like neutering the hung task timer either. > > Hi Salman, > > How about modifying the block layer such that completions of bio > fragments are considered as task activity? I think that bio splitting is > rare enough for such a change not to affect performance of the hot path. Are you sure that the task hung warning won't be triggered in case of non-splitting? > > How about setting max_discard_segments such that a discard always > completes in less than half the hung task timeout? This may make > discards a bit slower for one particular block driver but I think that's > better than hung task complaints. I am afraid you can't find a golden setting max_discard_segments working for every drivers. Even it is found, the performance may have been affected. So just wondering why not take the simple approach used in blk_execute_rq()? Thanks, Ming Lei