Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6570664ybv; Wed, 12 Feb 2020 15:07:37 -0800 (PST) X-Google-Smtp-Source: APXvYqxALTl3353y5O6q8eDmWP6ghmY3ASm3p72wDviwRS6mxZFcIO016VdA+/A+bcLav0lGyyxr X-Received: by 2002:a9d:6c01:: with SMTP id f1mr10818268otq.133.1581548856947; Wed, 12 Feb 2020 15:07:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581548856; cv=none; d=google.com; s=arc-20160816; b=JsmsZNkWv0oLY9yuQC8YSplnv02Xz4WpuvvfB/TLpZuCvUVU+9rNV1D5A3K7zG5oTI OomPpAir5vooo0C3f7/0yuLbm70tut+8BXWPpvd9oaiakouQ39Hz8vGlc/y/aP8/N5Oy L+j06Q7C+cbxe37QFAHJBnNEcXH90ac6g1MEJmTVsEt+a5P/DIdJxlnst+tCqzmK1utd SDdCRrEjsPN7JZQHbETzganm+G6wchiBnerZ5mkXgJAPigx4x5vemm8RzYPSlPVoB8Zu 3nRkP0ZCa3rxCnMqGwGOQoQ0yeWqS9wpDujSgN239Bo1sK+pniHfSOTRoCwGJ6zN0ZyZ 1fEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=7R6JfVwhD1VhqupmAw0ysGJzaRrTMEubGKvBtUttoNE=; b=MZsOJySor4yYMBAsb/pQYdcQOGDdk2noURtwl0h5gQz7KvAMNx9wz1vQsgEbsobt0Z e5Arc4ayQcmrkaMaZURoV2Hezo6hCuA1ZpyS+aMnI22uIDapvJZ4aYgVR9rE/rqr+O3n fZdd/ntkscSf9S7mQUcRMTeNLBocc6PwPZ9wRfSjmVZPEP4uwmTu/B5BgysfADWVwIvZ fYKQJRlc11+8/dEcTT/iaHKtb3mx7EXkDtcqy2JxlyO+iq3E9kRBIJWbFY3FwbYi29+z NQgs5jFWl9NM20tHxZ0v+TQxDZbDeFIF/O/ry9yDtRoIqtX+cuezkyxwMSR2ddGznCNK Sf0g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si93321otn.150.2020.02.12.15.07.24; Wed, 12 Feb 2020 15:07: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729259AbgBLXHI (ORCPT + 99 others); Wed, 12 Feb 2020 18:07:08 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:47354 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727692AbgBLXHH (ORCPT ); Wed, 12 Feb 2020 18:07:07 -0500 Received: from callcc.thunk.org (guestnat-104-133-0-101.corp.google.com [104.133.0.101] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 01CN6rwI006237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Feb 2020 18:06:53 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id CAA92420324; Wed, 12 Feb 2020 18:06:52 -0500 (EST) Date: Wed, 12 Feb 2020 18:06:52 -0500 From: "Theodore Y. Ts'o" To: Salman Qazi Cc: Jens Axboe , Ming Lei , Bart Van Assche , Christoph Hellwig , Linux Kernel Mailing List , linux-block@vger.kernel.org, Gwendal Grignou , Jesse Barnes Subject: Re: BLKSECDISCARD ioctl and hung tasks Message-ID: <20200212230652.GA145444@mit.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. It seems to me that perhaps there's a different solution here for your specific case, which is what if there is a asynchronous version of BLKSECDISCARD, either using io_uring or some other interface? That bypasses the whole issue of how do we modulate the hung task timeout when it's a situation where maybe it's OK for a userspace thread to block for more than 120 seconds, without having to either completely disable the hung task timeout, or changing it globally to some much larger value. - Ted