Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp651206rdb; Thu, 15 Feb 2024 10:55:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW7N1Bu+Nbn/hpseBA0gm9Qe1AEvPfgYSO6216JB1jZ2m39yPp8d32hB/daZkV8Cme56uV/NORJ3XtWXblh4gc/pP44jbTWsZ7ePobsbg== X-Google-Smtp-Source: AGHT+IHloJYvepjzzheDqsOf8kvZqK+uT4w0qU+vYsMmSkC/+cEb8UpCep09gWs9T1rN3g7u5zWU X-Received: by 2002:a92:b70c:0:b0:363:bcf2:e88f with SMTP id k12-20020a92b70c000000b00363bcf2e88fmr2616109ili.27.1708023318190; Thu, 15 Feb 2024 10:55:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708023318; cv=pass; d=google.com; s=arc-20160816; b=AMt2JTw34Mr7qiIoALGcfLhqQCEzW35tEj5eA2YxBkM3ot1YMOTpN35FnEg6SWPE3p Bbvpjf0hMGu8qBZfPwRYWN3J8A3dCc+DGXGUZEB4Dr+z3LFzMefxRRR4uoiDW+hRZ8Zq KvY3Bv1N91UWO/050tA8EYohESZGOMmBj+ycp0bq069nqrivbvZTcXELkZAFkLA70eSh upBc4V0PEXbBK7uSRC6wLfBIP6wz/vhIufFMpXmx+nHXzg4ICxQYT0lBkoh7a7KGrHU0 A4MiovtVNODlTW0aPnwHsZhe4ZIhfAy2VRiFh2eQPkYHeIi10SYMWFQR155XWrb8TIE9 2Kcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=gd/nBR49doSsG3VSioCSlJtvAUHUWugVKqxOpc2w09k=; fh=kWlyV9X7ExBb9sO/4H1SUF0om/r6GW9QjS9FQZVKXus=; b=S1kM4lx4R4KVUmqU9+22ixqRbICRfJmI3AEXTz9QapxQxSlHhc/ccVveoTXlIHx8AF W3yW0ArDPZb1MUAhRWXe5H1OGRabGGXb+IWhoe7ZMZa/T77E+CekoqsdpamW5p+SKpOV dgyEoITAGQVBZ4bW8Atysdx73OVv4HincpBAbmKrIET6kU5kr4fPbxfHf5OpKNKnP3mE O2B7ZKLR6TZw7XSM1K6tfM3yxuUINssGi/5+6LPOouYChSNzHwdmTZ7WGWo44xjAIgup JDszTycllt+nvJUKVn2Bm0IHYTKAMwWx2K0+xAh6TBDh9inME8UewlmicktsXC3H+BpC Wgjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="L9/BOqb6"; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-67539-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67539-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t23-20020a639557000000b005cdf88fbc11si1475322pgn.48.2024.02.15.10.55.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 10:55:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67539-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="L9/BOqb6"; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-67539-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67539-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id DC64928795F for ; Thu, 15 Feb 2024 18:55:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A8BD1386C6; Thu, 15 Feb 2024 18:55:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="L9/BOqb6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39D79131E59 for ; Thu, 15 Feb 2024 18:55:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708023311; cv=none; b=YkMpItBoClWZ8/BE7FRZIFSQoyb2/InUu5RwBgohTtXvHcPkOczeAAX6AV7OLEMLHkpOuURtjeBIy6ezvZ94daCPliASC94/da0B4itBoNi70OE4QCJxrtvO4fO2toyTuy/V5h7DelWP/uLvP2QVVyQrotmUZV6X2XbhygY9mvA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708023311; c=relaxed/simple; bh=G1ZYeGSfL5ZXhmvPIxc4v8DItjIbZ3gG8J9on29g6B4=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=QOsxB3kL+lCSbPHTfNnySJEPock+OzD2q+VpktnRIQTHouH1U2rHMz1Ek/0lF+ht3dc4OzHJGwonLrNrs/INRfJR2a1U4/BuhVepgezyX4paFDK1RZgWJz0EBLflmq1Q9Nyi869NiebBBFa6jsUl3GqjClx2antKLUIkA8ZNAFk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=L9/BOqb6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 796C0C433F1; Thu, 15 Feb 2024 18:55:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1708023310; bh=G1ZYeGSfL5ZXhmvPIxc4v8DItjIbZ3gG8J9on29g6B4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=L9/BOqb6J7+0oZgcnmt3rIuZy6OJXPX6WK+b/Wlup84VCm4Ctjuu/fqlDY56oFykT 5hZNfCo3Wei+rd1W1ZH2Kj9Pes8h0sI4aJ82u39xdTPkUABtMmegYXpASSt4KOsvBm SrlgMR0H75KUn6L6f0sq4LIepwJdCHBlBatj78u4= Date: Thu, 15 Feb 2024 10:55:09 -0800 From: Andrew Morton To: Christoph Hellwig Cc: Kent Overstreet , linux-kernel@vger.kernel.org, fuyuanli Subject: Re: [PATCH] kernel/hung_task.c: export sysctl_hung_task_timeout_secs Message-Id: <20240215105509.b7b3c87c24ed35cdfb111f34@linux-foundation.org> In-Reply-To: References: <20240209070935.1529844-1-kent.overstreet@linux.dev> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Wed, 14 Feb 2024 21:26:34 -0800 Christoph Hellwig wrote: > On Fri, Feb 09, 2024 at 02:09:35AM -0500, Kent Overstreet wrote: > > needed for thread_with_file; also rare but not unheard of to need this > > in module code, when blocking on user input. > > > > one workaround used by some code is wait_event_interruptible() - but > > that can be buggy if the outer context isn't expecting unwinding. > > I don't think just exporting the variable ad thus allowing write > access is a good idea. If we want to keep going down the route of > this hack we should add an accessor function that returns the value. > > The cleaner solution would be a new task state that explicitly > marks code than can sleep forever without triggerring the hang > check. Although this might be a bit invaѕive and take a while. A new PF_whatever flag would solve that simply? Which are the potential use sites for such a thing?