From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28672C433DB for ; Fri, 8 Jan 2021 05:28:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE9A1233EE for ; Fri, 8 Jan 2021 05:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725930AbhAHF1l (ORCPT ); Fri, 8 Jan 2021 00:27:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbhAHF1k (ORCPT ); Fri, 8 Jan 2021 00:27:40 -0500 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72DFCC0612F5; Thu, 7 Jan 2021 21:27:00 -0800 (PST) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxkIV-008Fcm-8F; Fri, 08 Jan 2021 05:26:51 +0000 Date: Fri, 8 Jan 2021 05:26:51 +0000 From: Al Viro To: Jens Axboe Cc: linux-fsdevel , "linux-kernel@vger.kernel.org" , Oleg Nesterov , Song Liu Subject: Re: [PATCH] fs: process fput task_work with TWA_SIGNAL Message-ID: <20210108052651.GM3579531@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Jan 05, 2021 at 11:29:11AM -0700, Jens Axboe wrote: > Song reported a boot regression in a kvm image with 5.11-rc, and bisected > it down to the below patch. Debugging this issue, turns out that the boot > stalled when a task is waiting on a pipe being released. As we no longer > run task_work from get_signal() unless it's queued with TWA_SIGNAL, the > task goes idle without running the task_work. This prevents ->release() > from being called on the pipe, which another boot task is waiting on. > > Use TWA_SIGNAL for the file fput work to ensure it's run before the task > goes idle. > > Fixes: 98b89b649fce ("signal: kill JOBCTL_TASK_WORK") > Reported-by: Song Liu > Signed-off-by: Jens Axboe > > --- > > The other alternative here is obviously to re-instate the: > > if (unlikely(current->task_works)) > task_work_run(); > > in get_signal() that we had before this change. Might be safer in case > there are other cases that need to ensure the work is run in a timely > fashion, though I do think it's cleaner to long term to correctly mark > task_work with the needed notification type. Comments welcome... Interesting... I think I've missed the discussion of that thing; could you forward the relevant thread my way or give an archive link to it?