Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6680247ybv; Wed, 12 Feb 2020 17:25:06 -0800 (PST) X-Google-Smtp-Source: APXvYqwf3aFp6lIpqP3e/xf35WcSUNNge3mYPtbGx+r60Ke/kg0JY7XpgXhiJnqwAjpyrp5bZS1P X-Received: by 2002:a9d:7386:: with SMTP id j6mr11276444otk.336.1581557106562; Wed, 12 Feb 2020 17:25:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581557106; cv=none; d=google.com; s=arc-20160816; b=0Dle9eZsoERu83oKnFwZgeJI5kPtsgDemmeZ30LpvDuYQVtR8hB6OSOwwNbKDAdXFR kKWLptX7kPWyEEVOh4p3j9L9kx0fPMEdalnFjGdgF0xX1hFnOjwAQPL84nFtsaICKEDe b6o2LnXWakXce+d7w1m0MTasuLfCkEQzfQiGEbmt3XJ9V0UpS1UT4SVrLEQ4h7XVrGXT LcB+b3a/r8hpNYJ/v/5VeX8osjyEH4PqgoJRxICSdrN9Lkz9p+X/2L1uswLKh3MmUer3 zTlULT0EKepinSdgqLba4iY0bIJMlR0VjxdNpnl5stzwwZtW7tosW2Lv0SuSXxgyMu3R nynQ== 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=PILiMPIWP83o9BEbVPcc2wkT+EgjSJOcxDjVmVXRxQ4=; b=LudRocURFeO6q2rSN8XBxPWyRcLuT1eUhYchwx3D+cxAN1k8Xf5n48K8Z9skxZqWs1 rayElyGLBOnfr4A+S0YJgateoywqtq8MLmmfBkn+Isdn2Yo/WagsAmnyI03wdrQ2fuc2 AiPRzTKvyAwNRI4SpKTvfmm3CmXYz9BwlDeJ1fzSkft0+aPBB7TgyUUxuePVyN58B3QZ GL0pyyG7Gj1GuEVpV37djdvOqyaI2sMUKisbu2bnxJCgrncej7DpNclJSuYWEdRRPS92 GlINGrZ/qiUFvSfNsa4phqukXX2O5abwu1s2Tn5A29do4wuVHU8pz7IptGZAQF2E0tHi 35WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VbKK3eHv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g26si276802otk.324.2020.02.12.17.24.54; Wed, 12 Feb 2020 17:25:06 -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=@google.com header.s=20161025 header.b=VbKK3eHv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729450AbgBMBYd (ORCPT + 99 others); Wed, 12 Feb 2020 20:24:33 -0500 Received: from mail-ot1-f45.google.com ([209.85.210.45]:35709 "EHLO mail-ot1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729369AbgBMBYd (ORCPT ); Wed, 12 Feb 2020 20:24:33 -0500 Received: by mail-ot1-f45.google.com with SMTP id r16so4016122otd.2 for ; Wed, 12 Feb 2020 17:24:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PILiMPIWP83o9BEbVPcc2wkT+EgjSJOcxDjVmVXRxQ4=; b=VbKK3eHv0jEZv+wG5KpbnI+nM5uIG95ROVb5rMd+HdMnBiiloxF3M2au9YKpNlMvH3 HX7AJll9ycYr+HTlyWJcvPNGwpm+O+QBAONVVfsQNkontupQ94WNAdKrExlHzC2/Ri+v bqhIYD2mo9AbtO1Gi2XcQxcJNXn1iynTWrEa8nJttq3QPbX1JgMynf1VXNPRRc0ZoGrP 6/H6eqa+ALrZ11hbuNORzH4xwlJxImKe/Pe/K9RI83dJGi9g/rRyaV12RbUdWmn9xO93 yid562ZhiigWEUUE7BBedZWIJwWrNf+UgeMAsyz5m42OXRW66L4H0b0eVUHfioHsXR04 B1hw== 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=PILiMPIWP83o9BEbVPcc2wkT+EgjSJOcxDjVmVXRxQ4=; b=KctqkiLFMuv+JQEEMjxp3EQzfaXKVkZWwfvxy2ikpyrqwSceo48nR6dUCigkE8CbTh u2Gi/h6FQkp3Nt/HlVzHaC9sEw0Np5oWm4nHHzqg+7rsMN/DqAPCnVEV1SuF4KDAanWC nH6VtO7RXCrntPhKWZcXTs/WtpJ/qlksmMINrbg6jXdWDTCduGGXjg8SuoKPKwBzDE2K jt4niLBfnC3QLMsTRIf71Qgkfp4q8AphC/z363zcrlCvd2S0AFj6UmB1WDmPuxWd1tTi 2GV+ahlzZc93ogtS/PgbWVNq23+5f0BQyKB/UvPECZ9ef5AVR2X/pCrNxoDVqCBSETJ+ 4ITA== X-Gm-Message-State: APjAAAW1uKJw5zhucYZsYhEIP30qpwoRfqww4fqBWoNC4cbMXCZwSdQ/ cGO6T+BxHRgAB1Ep/LFPW2z474UzknK2qEkOTnVqew== X-Received: by 2002:a9d:7f83:: with SMTP id t3mr7941193otp.63.1581557072210; Wed, 12 Feb 2020 17:24:32 -0800 (PST) MIME-Version: 1.0 References: <20200212230652.GA145444@mit.edu> In-Reply-To: From: Jesse Barnes Date: Wed, 12 Feb 2020 17:24:19 -0800 Message-ID: Subject: Re: BLKSECDISCARD ioctl and hung tasks To: Salman Qazi Cc: "Theodore Y. Ts'o" , Jens Axboe , Ming Lei , Bart Van Assche , Christoph Hellwig , Linux Kernel Mailing List , linux-block@vger.kernel.org, Gwendal Grignou 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 Wed, Feb 12, 2020 at 5:20 PM Salman Qazi wrote: > > On Wed, Feb 12, 2020 at 3:07 PM Theodore Y. Ts'o wrote: > > > > This is a problem we've been strugging with in other contexts. For > > example, if you have the hung task timer set to 2 minutes, and the > > system to panic if the hung task timer exceeds that, and an NFS server > > which the client is writing to crashes, and it takes longer for the > > NFS server to come back, that might be a situation where we might want > > to exempt the hung task warning from panic'ing the system. On the > > other hand, if the process is failing to schedule for other reasons, > > maybe we would still want the hung task timeout to go off. > > > > So I've been meditating over whether the right answer is to just > > globally configure the hung task timer to something like 5 or 10 > > minutes (which would require no kernel changes, yay?), or have some > > way of telling the hung task timeout logic that it shouldn't apply, or > > should have a different timeout, when we're waiting for I/O to > > complete. > > The problem that I anticipate in our space is that a generous timeout > will make impatient people reboot their chromebooks, losing us > information > about hangs. But, this can be worked around by having multiple > different timeouts. For instance, a thread that is expecting to do > something slow, can set a flag > to indicate that it wishes to be held against the more generous > criteria. This is something I am tempted to do on older kernels where > we might not feel > comfortable backporting io_uring. I was going to reply along the same lines when I got distracted by a mtg. If anything I'd like to see a LOWER hung task timeout, generally speaking. And maybe that means having more operations be asynchronous like Ted suggests (I'm generally a fan of that anyway). [snipped good suggestion about async interface] Jesse